#development
1 messages Ā· Page 65 of 1
Also hotspot optimization are šš¼
the native code it generates is pretty much on point
@shy helm major mistakes that people make with java, is creating too many objects
this is why minecraft on java, is kinda a bad idea
since everything is an object
and short lived objects are bad for performance
at least function calls in java are lightweight
minecraft is an interesting case though xD
without java, I don't think the modding community would be like it is today
Yeah if youāre creating tons of objects often then recycling is better for performance
@shy helm well, I'd still be careful there
Wait every block in mine craft is an object?
@shy helm yeah, so chunk data internally is stored as a byte[]
but when you use the APIs or any sort of code interface
if you request a block instance for a given location
it creates an instance
Whatcha mean?
immutable
@shy helm because immutability
if you mean to reuse an object, or modify it in some way
you create a new object
Immutability is not a good property if youāre constantly creating and destroying objects
You destroy your performance
yeah
these are two conflicting principles
OO philosophy says: do not reuse objects that can be modified
eg; make em immutable
Which OO philosophy says that?
I forget if it was SOLID or GRASP
I donāt think either say that
š
I donāt think immutability is a doctrine in traditional object oriented philosophy
I think you're right
@shy helm I think I just confused this with the open closed principle
where objects themselves should limit what can be changed
Ah yeah
like these formalities and such, I was taught this stuff
Open to extension closed to modification
but half the time when I am writing code, I apply these patterns automatically without thought
because they make sense :D
If you fundamentally get good code design they do š
From code Iāve read in the workplace, not everyone does
Lol
@shy helm the biggest design pattern that helped me write larger applications and avoided spaghetti:
Dependency Injection principle
Its such a powerful pattern
Yeah, using DI effectively is very good
I use it in all my projects now
The thing though is that you can still have terrible code with DI
@shy helm I like using it in places where I am not the initiator of an action or instance
like with rest services
Itās so convenient, but at the same time, you can get into DI hell, which is what springboot has some times
class instances get created by the webservr
so I don't have control over the constructor
but I can.. inject stuff in there
@shy helm I like Guice
its simple DI framework
I havenāt touched Java in a bit, but I want to look into guice
Iām currently using gnu-smalltalk and ocaml
Its runtime DI
Get me out
private ServiceAPI() throws Exception {
loadProperties();
Sentry.init(generalProperties.getSentryDsn());
injector = Guice.createInjector(this);
init();
}
/**
* Main entrypoint for the application
*/
public static void main(String[] args) throws Exception {
new ServiceAPI();
}
@shy helm app entrypoint^
Guice.createInjector(this) calls:
@Override
public void configure(Binder binder) {
binder.install(new DatabaseModule());
binder.install(new WebModule());
binder.install(new RedisModule(redisProperties));
binder.install(new StatusModule());
binder.install(new MetricsModule("metrics.properties", getDataFolder()));
binder.bind(ServiceAPI.class).toInstance(this);
binder.bind(GeneralProperties.class).toInstance(generalProperties);
}
even static references
can be done by instance
so bye bye static objects. and bye bye factories
only static instance that exists, is the application entrypoint. and it is stored by the injector
so you can just create a 2nd instance of the class
and run two applications in paralel
in same environment
@shy helm example for a database module:
public class DatabaseModule extends AbstractModule {
private final Logger logger = LoggerFactory.getLogger(getClass());
protected void configure() {
bind(SqlDatasource.class).to(SqlConnectionPool.class);
bind(PlayerDao.class).to(PlayerConnector.class);
bind(HighscoreDao.class).to(HighscoreConnector.class);
bind(LivePlayerDao.class).to(LivePlayerConnector.class);
bind(FamilyDao.class).to(FamilyConnector.class);
bind(ServerProvider.class).to(ServerRmiProvider.class);
bind(SpellDao.class).to(SpellConnector.class);
bind(BanDao.class).to(BanConnector.class);
bind(DaoProvider.class).to(ServiceDaoProvider.class);
bind(HouseDao.class).to(HouseConnector.class);
bind(ApiUserDao.class).to(ApiUserConnector.class);
bind(PermissionDao.class).to(PermissionConnector.class);
bind(SshProvider.class).to(RedisSshProvider.class);
bind(LessonDao.class).to(LessonConnector.class);
bind(new TypeLiteral<Set<String>>() {}).annotatedWith(Names.named("rmi.blacklisted")).toProvider(this::getBlacklistedServers);
}
@Provides
public DatabaseProperties getProperties() {
return loadConfiguration(getClass().getClassLoader(), "database.properties", DatabaseProperties.class);
}
@Provides
public File getServerList() throws IOException {
return getConfigFile(getClass().getClassLoader(), "server.list");
}
private Set<String> getBlacklistedServers() {
try {
return new HashSet<>(Files.readAllLines(getServerList().toPath()));
} catch (IOException e) {
logger.error("Failed to load RMI server blacklist: server.list", e);
return new HashSet<>();
}
}
}
So it binds bunch of interfaces to class implementations
bind(new TypeLiteral<Set<String>>() {}).annotatedWith(Names.named("rmi.blacklisted")).toProvider(this::getBlacklistedServers);
you can also do filtering
@Inject
RedisSshProvider(Redis redis, @Named("rmi.blacklisted") Set<String> blacklistedServers) {
this.redis = redis;
this.blacklistedServers = blacklistedServers;
try {
JAXBContext context = JAXBContext.newInstance(SshConfig.class);
sshConfigUnmarshaller = context.createUnmarshaller();
} catch (JAXBException e) {
throw new RuntimeException(e);
}
}
named parameters
Yeah
this is why DI in java is so nice
doesnt matter what lib you use
the interfaces themselves are interoperable
@shy helm but the reason I think guice is better, to say Dagger
you get to dynamically assemble your injector
so you could have a config file option for db_type: mysql | mssql | oracle
provide a module for each of them
and then dynamically load the module, depending on your needs
Dagger has its DI tree in XML, and it generates a class file during compilation
Dagger is faster at runtime, Guice has slower initialization to build the DI tree
@shy helm lol, you know you hate spring, when you refuse to use it and implement your own Authorization provider for JAX-RS
private static final String AUTHORIZATION_PROPERTY = "Authorization";
private static final String AUTHENTICATION_SCHEME = "Basic";
š§
@rancid nimbus https://en.wikipedia.org/wiki/Dependency_injection
In software engineering, dependency injection is a technique in which an object receives other objects that it depends on. These other objects are called dependencies. In the typical "using" relationship the receiving object is called a client and the passed (that is, "injected") object is called a service. The code that passes the service to th...
its just a technique to implement inversion of control
commonly used for larger modular applications
In software engineering, inversion of control (IoC) is a programming principle. IoC inverts the flow of control as compared to traditional control flow. In IoC, custom-written portions of a computer program receive the flow of control from a generic framework. A software architecture with this design inverts control as compared to traditional pr...
So, not sure if this is the right place to ask. But, would 2 3090s be complete overkill for machine learning?
"It depends"? A friend is very happy using 1, but says he could make use of 2. He's also actually making money with it though, which changes his approach to it.
Well, see I'm upping my workstation later this year and I was looking at 1-2 of them for Blender and Maya for game development, but also for machine learning. I'm still thinking of doing it on the server build, but I'm assuming a 3090 would be better than a P4000 for machine learning due to the vram
@ember torrent what kind of ML?
There's a lot of ML workloads that dont particularly benefit from GPUs
or are not worth getting a GPU for
getting a GPU for ML is only useful if you have a very specific workload that requires it
@shy helm Still doing research on the matter/just getting into it and plan to pursue it. However, I'm still set on a 3090 for the rendering performance. So, I'll probably just stick with one if it's not needed.
that's why I'm asking lol
I mean, it's certainly not needed š
Ya, I'll probably just stick with an asus strix 3090+5900x in my workstation and use the P4000 and the avengers i9 in the server.
3090 is good for ML workloads
But, basically I want to get into excessive AI development.
unless you're doing deep learning or transformations you probably wont make much use of it
more specifically, unless you're doing research on transformations, you probably wont make much use
3080 is much more economical option
but if you have a 3090 then obviously its fine š
but honestly, unless you're planning on doing a PhD, something like a you really dont need a high end card
learning AI can likely be done more than easily on something like a 2070
Well, I'm an IS major, have CS done on my own+at college, and I don't think I need a 3090 for my other degree, Asian Studies.
But, I do music editing/gaming coding/animations/3d modeling/now AI and more/cyber security/networking and more.
The reason I'd prefer a 3090 over a 3080 is also the vram for blender and maya
Fair, but if you're not making money from any of this I would say a 3090 is not worth it
price to performance a 3080 is much better for ML, not sure about rendering
and if youre just learning ML, you likely wont notice a difference
a lot of the workloads you'll do can be done on CPU in a reasonable time
For rendering and other aspects the more vram the better. But, it also "depends" on several factors. For gaming a 3090 is overkill, for ML it seems so, but for the projects I work on I've also consumed a lot of vram. Was helping a friend with his studio, and my VII was getting congested.
Which is 16gbs of hbm2.
You sure you were memory limited?
I mean that was one factor, not the only. But, it was still a factor and I get annoyed easy with that. I'm still holding off to see sw improvements that could help sorta. But, I also could just get a 5950x I have to go to blender's site again and check a few things.
I'm also curious about what render engines are the best. I typically stick to cycles. I haven't really followed lately to see if the 3090 is worth it or not. As the last time I followed it was like 4-5 months ago maybe?
Why does visual studio torture me like this?
@shy helm so, after doing excessive research a 3080 or 6900 xt is a better investment for blender. On one hand the 6900 xt is just now maturing, and oddlyg with the new pro render engine by AMD the 3090 gains a frame over cycles. XD So, I'll just wait for a 6900xt red devil or sapphire higher end one.
the 3090 only gains 5-10 seconds, but at the cost it's not worth it.
For ML though AMD GPUs suffer
Is it at the sw or hw level?
Both?
I'm getting mixed answers on the matter. Going to check a benchmark on the matter, but uh it might be a temp thing as they still haven't figured out a portion which is, from my understanding, holding the cards back.
If you use optix the 3090 will destroy the 6900xt
Obviously, it is a $1000 vs a $1500
Card
They are talking within the 6900xt/3080 range
But youāre looking at 25 seconds in classroom vs 79. Thatās a huge difference
The 3080 is still going to hugely outperform the 6900xt. Only issue is vram
@runic plinth well, that depends on the render engine too and other factors.
haven't checked in awhile, but doesn't optix disable the ability to do cpu+gpu rendering in favor of just the card?
I believe so. But the difference with optix is going to make that option moot
I have a threadripper and I use optix if that tells you anything.
@runic plinth Well, what I'm talking about is there's CUDA, Optix, and OpenCL in the settings. Does the Optix settings allow you to enable both CPU and GPU rendering at the same time, or is that still restricted to just the card in Blender? And, have you tested using more than 1 render engine to prove that? Because in every case I've seen originally, and not the difference isn't as drastic as you guys have claimed. It's like 6 seconds for a lot more money, but if you give me minutes sure I'll pay more. I went from a 1950x to a 3900x due to that. But, I'm going for a 5900x for other reasons too outside of just Blender.
Yeah it doesnāt allow you to use the cpu as well. But the difference between cuda and optix is better than using my cpu. And I have a 3960x
Plus, after looking at certain render engines AMD is going to have advantages that Nvidia has, but they're still being programmed in.
And itās not just a few seconds. With classroom itās 79 seconds vs 25. Thatās 3x
Like seriously for blender Nvidia is king
So, that's the other reason I was looking more at a 6900xt because 5900x+6900x in the new, not old crap render engine, is supposed to add what optix does but for these cards. It's not there yet, so you have to wait. I'm not buying now as I just dropped a lot on my server lol
I'll make my final decision later this year I just dropped over 2000 on server stuff, books, and a tube amp for my guitar.
Unless amd comes up with something huge itās gonna lose in Blender
And even if itās as good as optix it still isnāt gonna be as good as Nvidia just because of how far down it is
The main difference is the raytracing factor, and that's what gives them the advantage at the moment. AMD hasn't enabled their RT factor yet, so it's a maybe. That's why I'm waiting.
First gen ray tracing isnāt gonna make that big of a difference
I mean I still have some doubts because AMD is using SW to handle it for the most part while have some currently disabled physical ones, where Nvidia uses more physical raytracing based cores. So, it will be interesting to see where it goes. But, it's the new AMD Pro Render engine vs Optix. And, hopefully the new one gits gud because the previous one they did was garbo tier from what I heard.
The current/new render engine is out, but it's not like "complete" due to them still working on key factors of it. It's beta, but they're acting like it's not.
Yeah Iād still go Nvidia for blender. But itās up to you.
What's funny is the 3090 beats it in bmw, for example, by like 6 seconds with some of the RT aspect. They used optix for the 3090, I think, and opencl[clearly] for the amd card. Not sure if they enabled CPU or not in opencl settings. Forgot the classroom difference. I'll give AMD until the fall to improve their stuff, but I'm also not paying current GPU prices.
Whatās the time in bmw?
34 vs 40 I'll have to go back and check the conditions they set as I was watching an anime. I just remembered the 3090 winning by that much. So, again that is a factor to aka the render engine from what I've seen. But, in the default render engine, cycles, with optix ya. What you said is very likely true. I also wonder if AMD is getting an update later outside of just the pro render engine like Nvidia got in the settings. Or, will we be limited to OpenCL?
Thatās not with optix
Let me see if I can find what I was looking at unless you did. I only remember the chart portion from yesterday, so you could be right.
I know with Nvidia you can use either CUDA or Optix.
With optix I got 11 seconds
Using the latest pro render from AMD?
3090
I'm talking about the render engine not the card or API factor
You're using cycles most likely
Yes cycles
Hello guys Iām searching for a new laptop for programming only and I found the huawei matebook 14 2020 which as an amd ryzen 7 4800h and 16gb of ram, do you think that will be enough ?
I was asking for test reasons lol not for logical reasons also why use cycles and not something else?
Cause cycles with optix works
Is it still restricted to cycles?
I believe so
I was going to suggest vray, but I forgot cycles kinda contradicts the need for it in a lot of areas.
Btw adding the cpu in makes the render a lot slower
The biggest issue with using both is tile size
I'm curious if that's on both sides of the aisle or just restricted to certain combinations. Like is it a problem with Intel+Nvidia, Intel+AMD, AMD+AMD, and AMD+Nvidia? Or, is it just the scenario in general?
Itās due to how they render.
Cpu wants smaller tiles
So make small tiles and the gpu suffers. Make large tiles and the cpu holds the whole thing back
True, but still I'm curious as to how much AMD gains by finally enabling their RT method. I mean I still feel like Nvidia is going to win due to the higher physical factor vs the small physical factor and heavy SW factor that AMD uses.
Like my cpu renders the scene with small tiles in 1:03. My gpu does it in 0:11. Combining them took 3:14
3960x and 3090 btw
Wow
Well, I'm still going to wait until the fall since I just did upgrades I really needed to do more. Our current server was using a 5950, I'm trying to do 4k bluray, and I'm still adding storage to it. Plex, there was restrictions due to the GPU. I probably went overkill cuz I got a P4000 XD
I do 4k Blu-ray on my igpu for my Plex server
You have to, but the igpu doesn't have NVENC. So, I'm using both the igpu and the p4000. igpu due to the dumb drm factor that only intel has, and p4000 for no restrictions and other things. I'm majoring on the IS side in networking and cybersecurity but I prolly went overkill even for that. I have to take a 3rd language which is probably going to be scripting related like javascript.
But yeah for blender get the 3090. If you donāt need the vram get the 3080
https://pcpartpicker.com/list/LcDVZZ this is my media/storage/server I'm going to use for that lol
I mean I'll see what happens in the fall and if the RT add in is not that great then I'll prolly get a 3090 or 3080
Ya, I overpaid for the i9 because I'm a comic fanboy
Actually if you donāt really need the vram get 2 3080s. Itāll kill even the 3090
I'll consider it I was originally going to get 2 3090s XD
Well, we have 2 networking people and lots of users accessing it and doing a lot on it
Ahh nice
but, I had to go with intel cuz drm
Ahh
ya, you still need to use intel for sgx and hdcp which is required for 4k bluray, but you also have to use the igpu for that cuz drm by the bluray thing that like sony, lg, and a few others are the heads of. The alternative is yar har related, so I won't get into that. But, I plan on toying with scripting languages for it. The p4000 was a deal because they're hard to find on the used market atm under 600 bucks. Now, you can hack the nvidia driver if you're using linux iirc to remove the stream restriction, but that's kinda buggy and even a p2000 still wins in plex.
Oh I just rip the Blu-rays
Though due to plex's limitation factor I've heard, not confirmed, the p4000 does up to 64 unrestricted 4k streams. However, your ISP will hate you most likely.
Thatās true. I do have gigabit upload tho
As do I from "verizon" so, they'd throttle me if I tried that. XD
But thatās not enough for even like 8
well, it was 300-400 for a p2000 or a 530 shipped for a p4000. So, I got the p4000.
Fair enough
I'm just happy that usb one now comes with the right cyberlink sw for free, so I can actually watch the movies. I also live in a state where EULA's are actually law. Fun fact, if you live in the US technically ripping is illegal, and even buying keys that technically violate EULAs is illegal. Now, MS came out and said they don't really care if you buy OEM keys, so I'm fine there. They just won't help ya if ya do. As for, ripping a copy you own for your own use even that can be illegal. However, playing it on your own server is not illegal because not going to get into it due to the rules XD
So, if you want a backup headache live in either MD or VA.
Where EULAs are laws. The rest of the US ruled against it.
Yeah itās a grey area.
But yeah I own all the copies. Itās just for ease of use
I have Aspergers, and we become obsessive with collecting things that interest us. Glad I didn't get into cars, but tuned down my gaming collection stuff and focused my rigs on school/server/development factors. Quit playing Destiny 2, started reading books for school in advanced, and I'm reading one on C++ to update myself on the game development factor. I'm debating between an SQL or a Javascript course for networking. As, I want to focus more on developing, through scripting, improvements in security factors like 2FA. I already have Java done on the CS level, I taught myself C++ as well as Python and HTML.
I got into HTML after toying with site builders 20ish years ago like tripod and anglefire
@little zinc Sorry, missed your question. I mean 4800h is great for it but might also be overkill depending on what you're doing. IDE, what your doing, and how long you need it to last are key factors. For a long term C++ one I'd say yes, but if it's a shot term one and you're not really using the full aspect of it then it might be overkill. I went with a lenovo ideapad with a 4700u and 8gbs of 3200mhz for my small mobile workstation. Getting an Nvidia rtx/ryzen gaming one for my mobile one unless a company like system76 doesn't break my arm on pricing.
Also, I get grant money all the time and due to conditions I have to blow it on tech or asian stuff. XD So, this is what I blow it on
@ember torrent SQL is useful to learn
learning SQL the proper way, you first learn information theory
and collection theory
Learning SQL from a conceptual background is more useful, than learning it through queries
knowing how your db is structured, and how you design optimized databases is a skill you need to be taught
Normalizing data is also something I was taught during SQL classes
and this ^ is the most important skill to have when working with structured information
Database normalization is the process of structuring a relational database in accordance with a series of so-called normal forms in order to reduce data redundancy and improve data integrity. It was first proposed by Edgar F. Codd as part of his relational model.
Normalization entails organizing the columns (attributes) and tables (relations) of...
trying it again with a new mic,
import speech_recognition as sr
listener = sr.Recognizer
try:
with sr.Microphone() as source:
print("Go ahead...")
voice = listener.listen(source)
command = listener.recognize_google(voice)
assert isinstance(command, object)
next(print(command))```
this gives an eof error
@warm sleet Well, isn't SQL more for databasing where javascript is used for that and other aspects?
javascript is just a language
but learning SQL isnt just a language
because the database itself also has a lot of magic to it
Well, I'm focusing less on the database factor and more on the security factor while also focusing on that on the side.
@ember torrent sql is a tool to learn on the side tbh
but its often not taught properly
As a java developer myself
I mean I might just learn it myself then while learning javascript, but I'm at one of the better schools for scripting in my area.
moving to javascript was an odd experience
I hate the ecosystem, npm and such
such a mess
and there's no simple and easy way to write modular applications with deployment inbetween
like with maven
like, java is so good because it has maven
nuget for .NET is also garbage
doesn't properly build dependency trees
@ember torrent I recommend trying Typescript if anything
it feels more familair
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes before you even run your code.
it adds a typing system
and you can make interfaces
modules and such
plain js has modules?
@midnight wind yeah but js modules suck
how? just curious, because it works for me
require('wat')
I mean I'm more of a C++ game developer that does all the work on their own so like the game art, animations, etc while also helping others. But, I learned HTML first from my stepsister then I learned more of it in hs a long time ago. At uni we started with alice3d and raptor then moved on to VB for Windows Programming and then I learned Java for CS1. At uni 2 the VB and Java courses translated to my first 2 requirements now I'm required to take a 3rd which typically the suggest scripting, but the only offer sql and javascript.
in typescript you do
import {MyType} from "./relative/path/to/file
by using export default <>
yeah, but that's not something exlusice to typescript
So, the requirement for scripting is one or the other, and what's more beneficial to one who's mostly focusing on the cyber security factor?
ah
so you can do
const wat = await someFunction()
but only
if the scope its calling from
is also async
so you just add it to function parameter
@midnight wind its veeery similair
its javascript
with a typing system
but its gradually typed
so you can do {wat: string, foo: int}
as an implicit type declaration
if a function consumes an interface, and the object you put it matches the signature
it compiles fine
that's 'gradual' typing
@midnight wind lemme find some code
both tbh
they go hand in hand in web dev
I myself don't know sql
export const renderComponent = async <T>(component, content: T, client: UmbracoBlog) => {
const items = await client.getMenuItems()
return ({
rendered: await render({view: v => m(Container, {pages: items, languages: langMap}, m(component, {content}))}),
content: {...content, culture: client.getCulture(), project: client.getProject(), root: defaultPath}
})
}
ah so TS automatically returns a resolved promise?
ye
raises an exception otherwise
public async contentRoot(culture?: string): Promise<Umbraco<any>[]> {
return this.client.delivery.content.root({culture: culture ?? this.culture})
}
public async getByUrl(url: string, culture?: string): Promise<Content> {
return this.client.delivery.content.byUrl(url, {culture: culture ?? this.culture})
}
@midnight wind this is with signatures added
you can let the compiler do it implicitly
or declare them explicitly
in this case, I had to declare them explicitly
since its an API
ok so I tried just fixing it and putting the rest together to see if that fixed it and now I have
import wolframalpha
import pyttsx3
import speech_recognition as sr
listener = sr.Recognizer
try:
with sr.Microphone() as source:
print("Go ahead...")
def input():
voice = listener.listen (source)
command = listener.recognize_google (voice)
command = command.lower ()
print(command)
except:
pass
client = wolframalpha.Client("private ip")
assert isinstance(client, object)
SearchString = input
res = client.query(SearchString)
print(next(res.results).text)```
and got a bunch of errors
I'm a noob, what are signatures?
@midnight wind like, a method's signature
is erm
name, parameter and return type
like in OO
thats the minimal stuff you put in an interface
ah
In computer science, a type signature or type annotation defines the inputs and outputs for a function, subroutine or method. A type signature includes the number, types and order of the arguments contained by a function. A type signature is typically used during overload resolution for choosing the correct definition of a function to be called ...
Type signature describes its methods
ah, I now know what it's called. I used it, never knew the name
@midnight wind you know what function overloading is ?
well, you know of the concept
where
two functions within a scope have the same name
but their signature is different
yep
so different input parameters
someone have a good and fast meme api link no reddit?
crystal can you help
kinda need to show the errors, saying "I got a bunch of errors" doesn't help
I cant smell the problem from here
@umbral saffron have you tried using the debugger?
its a very powerful tool
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wolframalpha/init.py", line 89, in getattr
val = self[name] if name in self else self[attr_name]
KeyError: '@results'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/name/PycharmProjects/HMA_2.2/lib/python3.9/site-packages/pip/_internal/main.py", line 23, in <module>
print(next(res.results).text)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wolframalpha/init.py", line 91, in getattr
raise AttributeError(name)
AttributeError: results
print(next(res.results).text)
yeah
it worked before
thats wrong
just after adding speech recognition it wont work
@umbral saffron different queries in WA have different structure in their responses
there's some fields that are always present
others you have to be careful with
I recommend using the debugger
you can set a breakpoint at the line of code
and then in that, you can press the a little calculator button, and run small fagments of code at the frozen point in code
so you can figure out what res.results is
and what
next(res.results) does
Im in pycharm and I dont understand any of it
@umbral saffron on the left side, you can click on the space left of the text
and if you do
a red circle appears
oh I know the breakpoint thing
yea
so when you run your program with the little bug icon
it will halt the program if it hits that point
and then you can look at all the variables
and their values
and run small lines of code instantly, to test and mess around
figure out what is happening
is this it?
SyntaxError: Missing parentheses in call to 'exec'```
on the right side theres a bar showing ur errors and it says nothings wrong
yeah those are syntax errors
actual program errors
you should fix those lol
SyntaxError means you dun goofed up
it says py from _pydevd_bundle.pydevd_comm import CMD_SET_BREAK, CMD_SET_NEXT_STATEMENT, CMD_STEP_INTO, CMD_STEP_OVER, \
is wrong
Apparently, for me I can do one of two things. I can take the first course which is basic interactive SQL then take the following which is focused on using the understanding of SQL and developing/dealing with cybersecurity. Or, I can just take the one that focuses on AI development.
I myself like cybersecurity, actually just today I "hacked" into some of the beginner machines on hackthebox (with the help of the guide of course). You can get a good sense of security vulnerabilities by actually hacking into them @ember torrent
pentesting
@ember torrent cybersecurity is very simple
Well, I do have the benefit of living with a retired cybersecurity professional
never. ever. send user input to system
that includes a shell, a syscall, or a language command
I know my mom was a cybersecurity professional for the US coast guard and became a VIP for one of the DC area early physical 2FA makers, I live with a former federal agent for several agencies and was an instructor who had his masters in networking and cybersecurity, and then I'm one of those bored Aspies who did some shade stuff. The reason I am getting into it is to fix bad cybersecurity which is way too common here.
Most government sites and servers have more security flaws than they think, and that's partly why they get hacked so easily.
There is also the fact that there's no such thing as perfect security, and someone will always find a flaw that they can manipulate.
oh right, this is the course that kinda caught my eye " Introduction to Artificial Intelligence: Concepts and Applications"
Traceback (most recent call last):
File "/Users/masonhowell/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/203.6682.179/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 4, in <module>
from code import InteractiveConsole
ImportError: cannot import name 'InteractiveConsole' from 'code' (/Users/masonhowell/PycharmProjects/speechrec_deeplearning/code.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/masonhowell/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/203.6682.179/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py", line 39, in <module>
import _pydevd_bundle.pydevd_comm
File "/Users/masonhowell/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/203.6682.179/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 91, in <module>
from _pydevd_bundle import pydevd_console_integration
File "/Users/masonhowell/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/203.6682.179/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_console_integration.py", line 6, in <module>
from _pydevd_bundle.pydevconsole_code_for_ironpython import InteractiveConsole
File "/Users/masonhowell/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/203.6682.179/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevconsole_code_for_ironpython.py", line 305
exec code in self.locals
^
SyntaxError: Missing parentheses in call to 'exec'
Process finished with exit code 1```
These are the ones I have left
and I dont see an issue with any
I think I'll do cybersecurity on my own and networking and focus on AI/ML
Itās fine! Just escape it properly
Keep in mind, ML/AI is very math heavy, unless youāre just doing application
Good fundamental understanding of moderately advanced statistics and calculus is a requirement to actually study the underlaying work
That's fine I got offered to teach the mini Calculus course as a TA lol
I got an A in calc and I have to take stat based algebra course first.
Like high school calc?
Or uni calc?
The math is not taught in high school, nor likely in first half of under grad. The basis for most AI at the moment involves high order partial differential equations, stochastic optimization, matrix operations (stuff like LU factorization, eigen values), hessian matrices, to name a few things. You should also be comfortable working with proofs (reading and writing)
Not trying to discourage you, I just want to make convey that AI is a complex subject rooted in complicated math, if you find the kinda of stuff mentioned above interesting youāll likely pick it up quite well š
I'm 30, not 17 lol. I have a degree that focused on computer science and advanced mathematics. I also did college tier in early hs.
I'm good at trig, algebra, statistics, calculus, geometry, physics, and several other variants. Asperger's and interest lol
Oh lol fair
does any one know if you can get pycharm to see a tab as a single char, because its madning , i find settings for tab with and such but it always transforms them to spaces upon editing the text .... i mean notepad.exe does it right cant be that hard...
Are you sure you didn't set the indention as spaces
Hey any atmel flip user here?
Just spent, 40 minutes trying to figure out on my own how to reverse a linked list, and then in the last 5 minutes i realise im stupid and it's like you know less than 10 lines or so
Hey someone have a good and fast meme api link no reddit?
Ya, I went to a 2 year and did up to trig then transferred and did applied calculus, mainly used in IS and accounting, which is basically calc without trig, but I've being doing physics and calculus with trig since I was 14. But, I did get offered to be a TA due to my grade and background of Calculus. A homeschooling teacher I had was a math nerd from the NSA, iirc.
I'm loving this new text book I need for one of my IS classes. I've yet to understand how the lower programming class and calculus is needed for it, though.
Actually, I hit chapter 2 and now I get why. Anyone have experience with this book? I've heard it's problematic, but the ebook version is the worst.
@shy helm @runic plinth I might be getting a 3090 ftw3, actually.
Thatās what I have
someone's offering a used one with the traded warranty for a fair price, so I made an offer to her.
It's not scalped either
Figured it will be more useful in the long run for ML and other tasks for 3-4 years of not upgrading.
@hollow basalt ,... here is the real funny (or not so funny part) if i write the utf8 codes to a file with python , the tabs behave like tabs but if i ad a tab to the same file and then do backspace its spaces again ...
@runic plinth well, she sold it. So, I made a scalper's day and got the version I wanted. An asus strix oc 3090. But, I have no confidence in stock for the version I want. On the plus side, I don't plan to upgrade my gpu now for several years.
Ouu nice
since she sold it and I cringe at the price, but due to stock issues and wanting this one in particular I caved to the dark side....scalp city...
Hello guys,
I just got a code for a API i'm trying to run it i'm not sure in what format and how it would run actually
`var server = "http://localhost:1300";
$.ajaxSetup({
async: false
})
function getCurrentMatch(){
let currMatch;
$.getJSON(server + "/api/match/", function(response){
}
@swift yacht you can just use XMLHttpRequest
In this guide, we'll take a look at how to use
XMLHttpRequest to issue HTTP
requests in order to exchange data between the web site and a server
function reqListener () {
console.log(this.responseText);
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "http://www.example.org/example.txt");
oReq.send();
Thereās also the newer fetch app which I prefer: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
The Fetch API provides an interface forĀ fetching resources (including across the network). It will seem familiar to anyone who has used XMLHttpRequest, but the new API provides a more powerful and flexible feature set.
Hey! I've made a new development log video for the game I'm making with godot engine, showcasing my new textures, shaders and gameplay feature š! https://youtu.be/Q9xPZfGWw1g
The antennas are now used simultaneously as collectibles, checkpoints and gameplay elements. I think that it's great in a game to have multiple purposes for each element, instead of just collecting things, make those things give you back some life points for instance like coins in most 3D mario games. I did that in a way with the antennas.
Prev...
how do i randomize the numbers in this loop?
`<html>
<head>
<style>
table, th, td, th {
border: 1px solid black;
}
</style>
<body>
<table border ="1" style='border-collapse: collapse'>
<?php
for ($row=1; $row <= 6; $row++) {
echo "<tr> \n";
for ($col=1; $col <= 6; $col++) {
$p = $col * $row;
echo "<td>$p</td> \n";
}
echo "</tr>";
}
echo "</table>";
?>
`
simply said
i want random icons from a fixed set of 5 icons and a random icon from a fixed set of 5 colors
ok
@south pagoda sorry to text you here, can we talk in the dm?
@south pagoda cause the author of the BR template told me a while ago to not share code of his project in public discord channels

it's fine š he's not writing the next facebook or amazon
at that size, i don't see a problem with having things in one file
At least it's not the webdev course at my uni that makes the students use images a buttons on the website.
So i know absolutely nothing about C++ but im trying to compile this github file and its trying to include "winternl.h" but the problem is, all the files it has in there, theres nothing that tries to include winternl.h so i dont understand why there is this error
@analog notch lol you casually sliding your black hat business in here?
ultimate script kiddie.
its not malware
its simply just detecting my machine to see if its a VM
search it on github
I'm looking at it rn
@analog notch might need msbuild to compile this project

@analog notch there's a project solution file in this repository
just install visual studio
and open that .sln file
install the VC++ development kit
alright i got it to work through visual studio code
thanks
Sorry if it seemed if i was doing black hat shit, im just trying to run programs that have anti vm detection and i need to figure out what to change to get it to work on a VM
so Ik i put print(error)
but i dont want it to
import speech_recognition as sr
listener = sr.Recognizer()
try :
with sr.Microphone() as source :
voice = listener(source)
command = listener.recognize_google(voice)
assert isinstance(command, object)
print(command)
except :
print("ERROR")```
it should take my input right
@umbral saffron Did you mean to pass voice (which is just listener) into recognize_google? You basically have listener.recognize_google(listener) which seems wrong (not familiar with this library though, I'll be of limited help). Also source is unused.
Also, if you remove the try ... except print("ERROR") you'll get much more information about what actually went wrong.
anyone know anything about time sync across computers? I have two linux boxes (one VM and the VM host) and I'm trying to determine the lag from send to recieve.
The program is written in python so I'm basically just sending a packet with time.time() and subtracting that from time.time() on the other system.
I'm curious about how precise something like that is.
But it also started me on the rabbit hole of how can we even tell that two computers have the same time down to the smallest increment? Both boxes are ubuntu 20.04 with the same timeserver configured so I'm not sure where to go from there.
ICMP echo aka ping gives back lag aka latency in ms
So I guess you could maybe make a program that sends the time across via udp and then corrects for network latency
IDK why you are trying to do that though
True but that's the timing from send-receive-send-receive no? So it's not a measure of the precision of the two computers time
like if I set the time on one computer to 5 seconds ahead/behind the ping lag wouldn't change right?
yeah i read up a little on that. Was more just a passing curiosity about how you would even start to be able to compare times that fast.
Now, you should see how people sync times in GPS
since we have time dilation

uhh what
what do you mean
so lets say I did
def 123():
1+2 = a
2+2 = b
how do I call just 123 and nothing else
@hollow basalt
call like invoke?
123()
Function cannot start with a number
Cannot define an undefined variable to a literal (a=0, not 0=a)
Call a function like foo()
hey guys does anybody know a good guide or smth to start with c++ from scratch? i study electrical engineering and my professor isnt really good at teaching
ok thanks
hey check my cool website it has blong post where we can talk http://solongslong.uk.to/
and how do I make http into https
@royal agate Codeacademy, Arduino is also a nice learning platform for C/C++, electronics and DIY
ssl certificate
@royal agate cherno project's videos, they take about 20 videos before they actually get into it but besides that just think of something you want to make, break it down and google each issue you have, there is no quick way to learn how to code without knowing another language, if you do know another language then hop on C, you can learn C in about 3 weeks if you have some experience, it is a pretty easy language and will be helpful when you start tackling x64 and x86 asm in the future.
guides and stuff like that dont tend to help, you mainly just need to learn the syntax and google every issue you have and you cant just watch a video or read a book, you need to get your hands dirty and try something, apply what you're absorbing, even if it is very basic.
so lame.
Rickrolls were funny in 2005
hi, i need help with a java code
i would suggest to put your question here, not asking for help
make it secure
@devout bluff (dont worry diffrient guy)
ik that was just an example
Late reply sorry. I'm not sure why you're looking into this so this answer may not apply, but you could look into things like Precision Time Protocol. I'm not super familiar with it, I know it's involved in my wife's work and they have to get some fancy expensive network equipment for it.
@urban flint https://github.com/goldsborough/ipc-bench
IPC benchmark is umbrella term here
latency also depends on the kind of virtual machine you use
Yeah that came up in my reading about the issue. All very interesting stuff haha
My weekend project, a "KVM" that can send your keyboard/mouse signals over websockets to as many computers as you want. The keyboard/mouse have to be connected to a linux machine but there are clients for mac/windows/linux as well.
The Mac one is fucky as hell rn because the way it handles some keyboard modifiers are weird
Kinda reminds me of a multiterm thing one of my coworkers needed to do (sending same commands to n servers)
I worded that kinda funky but it only outputs on one computer at a time haha
I ordered a rpi0w and want to make my own "wireless" wired keyboard
@urban flint using OTG mode?
there's a kernel driver in there to emulate a keyboard yeah
No, just basically strapping a keyboard, battery and rpi0 together and have my program run on startup and connect to my other computers via WiFi
That's why I was asking about timing between computers! š Depending on the setup it's anywhere from 20ms to 5ms and below. Which is fine for my purposes. I have some ideas for further optimization but the current lag is not noticable to me
And that's wireless-wireless too not a vm
It's a 2011 Mac book too so it only gets better I would think ššš
ok i wanna know if its possible to like cause and detect a memory error that ECC would otherwise detect
can you just like, run a loop a billion times setting a variable to like max_int and then sometimes it wont be equal to max_int?
MemTest86 and Memtest86+ are memory test software programs designed to test and stress test an x86 architecture computer's random access memory (RAM) for errors, by writing test patterns to most memory addresses, reading back the data, and comparing for errors. Each tries to verify that the RAM will accept and correctly retain arbitrary patterns...
can i do that myself in any basic language
not sure, not an expert
i have a feeling, that you have to be pretty low level to write a useful memory tester (that's why memtest runs outside the OS as a bootable program)
if you're running an application within an OS, you won't be really able to write to any random physical memory address AFAIK
alr i probably wont bother cos i dont care that much, I was just curious because I feel like if you cant write a programing like java,python, or anything like that, that can cause a memory error without ecc, then ecc seems kinda useless. . .
it's probably possible
but again, not an expert
memory error can definitely be triggered from anywhere :) anything that reads/writes memory
so youd think you can just make a 1 billion int array and eventually you'll find one that has an issue right?
here they say there is a chance to detect it with write/read loops
https://stackoverflow.com/q/7086236/4620101
In any case, one common way to detect problems in any sort of memory is to run simple write compare loops over the address space. Write 0's to all your memory and read it back to detect stuck '1' data lines, write-read-compare F's to memory to detect stuck '0' data lines, and run a data ramp to help detect addressing problems. The width of the data ramp should adjust according to the address size. (i.e. 0x00, 0x01, 0x02... or 0x0000, 0x0001, 0x0002, etc). You can easily do these types of things using storage performance benchmarking tools like Iometer or similar, although it may be just as easy to write yourself.
If you do decide to go ahead anyway, the obvious way to test is allocate some memory, write values to it, and read them back. You want to follow sufficiently predictable patterns that you can figure out the expected value is without reading from other memory (at least if you want to be able to isolate the error, and not just identify that something bad has happened)
although if i can guess these errors are probably very rare (in non-malfunctioning memory)
About that last part, 'errors are probably very rare (in non-malfunctioning memory) ' .... Im not that sure about that, enjoy, super interesting presentation : https://youtu.be/aT7mnSstKGs
Speaker: Artem Dinaburg Security Researcher, Raytheon
We are generally accustomed to assuming that computer hardware will work as described, barring deliberate sabotage. This assumption is mistaken. Poor manufacturing, errant radiation, and heat can cause malfunction. Commonly, such malfunction DRAM chips manifest as flipped bits. Security re...
i just started watching this and i know this is gonna be good
I tried making *the most epic compression algorithm* which takes bytes and finds the position where N calls of nextInt() in a java new Random(0) that your file appears.
Good news, I can compress a 2 byte dataset into, erm, one 64 bit long. Bad news, It hasnt solved any 3 byte dataset in about half an hour now.
Grubby
Excuses For Lazy Coders
just refresh the page a few times for new ones
a couple of them are genius
thanks! i'll watch this today
RE: comparing time between computers. The "lag" between my server and VM (on the same machine) is now around -0.03 seconds per message š
from wifi connected computer to wired computer it is reported as around 0.04
and after rebooting the vm its +0.16 lol
http://pages.cs.wisc.edu/~ballard/bofh/bofhserver.pl known by everyone problably but since lolbroek "P kicked it off i had to post this one ...
not that the vid i poste d was not educational , because the info in the video is much more detailed but here is the one i was looking for (damn youtube
its much less informative but makes up for it in spectacle š https://www.youtube.com/watch?v=9Sgaq6OYLX8
Robert Stucke
August 1st--4th, 2013
Rio Hotel & Casino ⢠Las Vegas, Nevada
Hi! I'm trying to learn how to use Ktor, but I ran into a problem. When I try to do this in main:kt val server = embeddedServer(Netty, port = 8080) { install(ContentNegotiation) { gson { setPrettyPrinting() } } }
setPrettyPrinting() cannot be found. I have the io.ktor:ktor-gson dependency installed. What's going on? (I can send code if needed)
Note: I'm following this tutorial: https://ocallaghan-donal.medium.com/building-a-kotlin-back-end-in-15-minutes-5ffdbe018776
@umbral saffron use pip?
python is meant to be platform-independent so its pretty much the same on all platforms
Agreed, unless the library has some platform dependent calls

Now that I think about it
sudo apt install python3-pip
Pretty sure the pip search function hasn't worked for months at this point but the rest works fine.
@peak acorn lol, tabs and spaces
if I press tab on my editor, I get 4 spaces
other developers go into a feud over 2 vs 4 spaces
tabs are really anoying, and I filter them with a git hook.
source code is monospaced, so you don't need TAB to 'tabulate' to the nearest column
Tabs can be configured by the person's editor to fit their preferences. Spaces can not. If you insist on spaces in code I just assume you're a selfish ass.
Tabs: "I like 4 spaces. Joe likes two because he still uses 640x480 or some giant font. Let's just each configure our settings and we can both work the way we like". Using spaces is idiotic.
@pliant siren tabs have no set width.
so when you have code styles that define an 80 or 120 column limit
tabs just mess you up
Favoring spaces over tabs has nothing to do with selfishness
Its just clean code.
isn't that good? That way each person can configure their TAB space how they like it but it won't change what the actual code it
and people actually use spaces?
isn't that annoying
Editors show tabs differently
Spaces are more uniform
that's the point
I didn't even know this was a big debate
One thing is certain
These rules are overridden by your local configuration
e.g. your company or your project
@midnight wind there is no issue
as long as its either: all tabs, or all spaces
but the problem comes when you have a mix.
this is just trolling
yeah but tabs are evil, just replace with 2 or 4 spaces depending on your style.
Editors should be smart enough to stop people from mixing
ah, ok. Makes sense
@midnight wind not every editor uses same width
my point
and sourcecode is written and displayed with monospaced fonts
so tabs are utterly pointless
only place where it makes any sense to use tabs is in languages that ask you to do so
like YAML
I decide on using space vs tabs when using different prog languages
in java,c++ i use tabs
in python I use spaces
@hollow basalt I still use the TAB button, all the time
but a single TAB indents by 4 spaces
and if i press backspace, it also removes 4 spaces
That's not my point whether you use the button or not
I simply use tabs for java
cause
why not
@hollow basalt https://i.imgur.com/36Ci3m9.png
Not sure what the default is that IDEA uses
but I think its the oracle code style
google's code style is slightly different
mostly identing rules and column width
I prefer 120 over 80
@hollow basalt at the end of the day it dont really matter, as long as everyone uses the same style
but thats what we have a .editorconfig for now
somewhat standard way to describe line indents and linting logic
any comments about these?
https://www.zdnet.com/article/10-years-old-sudo-bug-lets-linux-users-gain-root-level-access/
https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit
oof.
time to patch my servers
thanks for the heads up
Provided to YouTube by RCA Records Label
Smooth Operator (Remastered) Ā· Sade
The Ultimate Collection
ā 2011 Sony Music Entertainment UK Limited
Released on: 2011-05-09
Vocal, Composer, Lyricist: Helen Adu
Drums, Percussion: Dave Early
Composer, Lyricist: Raymond St. John
Percussion: Martin Ditcham
Producer: Robin Millar
Engineer: Mike Pela
...
š Tabs >>>> spaces
Fewer keystrokes, less time to write the same code, more time for me to not spend writing code š
I just have my text editors convert tabs to spaces lol
I made a shitty interstellar meme using my cross platform(ish) kvm thingy
@shy helm my IDE replaces tabs with spaces automatically, and a single backspace also removes same amount of spaces
its just how you configure your indentation
so you basically use tabs but not tabs
this is complete ass on editors like visual studio where a tab = 4 spaces, but backspace 1
yeah
@shy helm it makes for cleaner code when reformatting and such
it just means I use the tab button, but dont actually inject tabs into the textfile
idk, I find tabs to be easier to use
no need to setup rules to deal with it, it just works ā¢ļø
but one space just works

jail
Glad i started a battle of tab v spaces with one graph hahaha
Can I create the register db connection in js without nodejs and connect it to my html registration form ?
having a frontend database connection is a very big security vulnerability
so just dont do it
yes, but bad idea
he wants you to do that?
š¬
He didn't teached us how to do it yet but want a working register
And login
Well he didn't teached anything but he want the project
well if he's gonna teach you later then yeah you can do it but just know not to do it in the future
Ik
I'm planning to create my own website with nodejs express and react or something
if you want I can show you the website so far for my project I showed yesterday
This is just a project for him
but later
nah, just I want to clean it up and get it all working
I will later host it
right now it just lives at local host
Oh ok
Are you getting your money's worth from your ISP? Find out in 3-6 months from now when you have collected enough data: https://github.com/sebastiansam55/isp-tracking
no idea what caused these spikes. I don,t remember having shitty internet during those time periods but who knows.
basically lol that plus some R code to make pretty graphs
Does anyone know what language the software on satellites like starlink would be made in?
@peak acorn probably some RT system
We can only speculate
Erlang Programming Language
This is common in telecommunication systems that work in realtime
the only concrete answer I found from the spacex team is that they use linux with a special kernel patch
And yes, we do a lot of custom ASIC development work on the Starlink project. ā Matt
All of the application-level autonomous software is written in C++. We generally use object oriented programming techniques from C++, although we like to keep things as simple as possible. We do use open source libraries, primarily the standard C++ library, plus some others. However, we limit our use of open source libraries to only extremely high quality ones, and often will opt to develop our own libraries when it is feasible so that we can control the code quality ourselves. In terms of error handling, there are a lot of different facets to that. Radiation induced errors in computers are handled by having multiple redundant computers and voting on their outputs. Errors in sensors are handled by having multiple different sensors. Errors in data transmission are handled by using error-detecting or error-correcting codes attached to payloads. The software is definitely composed of multiple small modules, the design of which was one of the main things I worked on. There is a hierarchy to the design from low-level component, to sub-system, to entire vehicle. Different subsystems are generally isolated from each other, sometimes in the same computer, sometimes across different computers, with narrow interfaces between them. I'm not sure how long it would take us to re-write the code base from scratch. We don't plan on deleting it any time soon. ā Josh
All of the application-level autonomous software is written in C++. We generally use object oriented programming techniques from C++, although we like to keep things as simple as possible. We do use open source libraries, primarily the standard C++ library, plus some others. However, we limit our use of open source libraries to only extremely high quality ones, and often will opt to develop our own libraries when it is feasible so that we can control the code quality ourselves. In terms of error handling, there are a lot of different facets to that. Radiation induced errors in computers are handled by having multiple redundant computers and voting on their outputs. Errors in sensors are handled by having multiple different sensors. Errors in data transmission are handled by using error-detecting or error-correcting codes attached to payloads. The software is definitely composed of multiple small modules, the design of which was one of the main things I worked on. There is a hierarchy to the design from low-level component, to sub-system, to entire vehicle. Different subsystems are generally isolated from each other, sometimes in the same computer, sometimes across different computers, with narrow interfaces between them. I'm not sure how long it would take us to re-write the code base from scratch. We don't plan on deleting it any time soon. ā Josh
@midnight wind so realtime C++ on linux
yeah that seems reasonable
linux kernels can be compiled for realtime applications
anyone work with stuff like R or matlab or numpy regularly?
How do you do it without wanting to kill yourself?
@warm sleet @rancid nimbus @midnight wind thanks
you don't š
So on my raspberry pi it doesnāt have speech_recognition built it on python
So I tried to import it and it says it doesnāt exist
Should it
@umbral saffron https://pypi.org/project/SpeechRecognition/
Ahh tyty

you probably have some mismatched quotes or brakcets or something like that
the error should give you the line number it happened on
looks fine to me lol
I donāt see an issue with it either
would have to see the wider context of the error. Check the lines above and below it as well sometimes line error numbers can be weird
This is all of it
object is not defined
lets say you wanted to check if x was a str:
x="s"
isinstance(x, str)
you can see what type something is (if you don't know) with print(type(<thing>))
doing print(type(x)) would print:
<class 'str'>
does your RPi have a microphone? that might be another speedbump you run into lol
It does not but I added an external one
So I removed the object var
Still gives the eof error
Well something need to go there, the isinstance looks for two variables. But in either case post the whole error code
Traceback (most recent call last):
File "/home/pi/Documents/`.py", line 9
print(command)
^
SyntaxError: unexpected EOF while parsing
Is the assert still in there? Honestly not a python pro but I use it fairly often and have never run across that before. Comment out that line and see what it does
same error but on the print line
idk man I typed out the program in your picture and didn't get that error
are you sure it is being saved correctly? that you are running the correct file?
also you should use a different filename. I don't think that that is the issue but still lol
it autosaves like that lol
Are you copying this code from somewhere? Not familiar with SR but the
voice = listener
command = listener.recognize_google(voice)
line is weird to me it's equivalent to
voice.recognize_google(listener) no?
that should be illegal
indeed
I guess
lets see if that fixes it
hmmm
it gives me the eof error even if i remove the print function or the assert function
save it under a different name and try running it via commandline
you have to make sure you are in the right directory. Try to save the file as /home/pi/test.py
by default on most (if not all) distros when you first open the terminal you are in the /home/<username> directory. this is often abbreviated as ~
open a different text editor and put the simple print("test") in it and try to run that
No news is good news?
Python is quite strict with line indentation and newlines
The end of the file must have an empty line
or you get an end of file error
I highly recommend using an IDE with syntax highlighting
helps tremendously with spotting issues like these
also, every python script should start with a shebang
#!/usr/bin/env python3
after you chmod +x script.py
you can do: ./script.py
instead of python3 script.py
same goes for bash scripts or any language for that matter
just include interpreter information in the shebang, and the shell will call the right interpreter
If I can chip a recommendation in I use sublime 3 with all of the white space visible (among many other configuration changes)
it's the winrar-esque payment model where they tell every x number of saves that you are not using a registered copy or something but it is not that intrusive
I use the jetbrains toolkit for all my projects
all those IDEs for the various languages behave the exact same way
so its a lot easier to get your work done
its all based on IntelliJ
best IDE imo
I get you can write small scripts with a simple text editor
but once you work on large systems, with database and server facade integrations
having this kind of program is just nicer xD
also if you use linux to linux sshfs is amazing for editing remote files you could probabny find a linux to windows but i use mainly linux so it fits great in my workflow
@urban flint yup
if you do development for an rpi
always use sshfs :D
its great
@urban flint I can usually get my software to run on all operating systems
its just, the moment you have to work near things like filesystem and driver integration
that it becomes hairy
just hope that someone had this problem before you, and wrote a library for it xD
I've written my own javascript standard library before >_>
for nashhorn in java
interpret javascript, gets compiled and executed as java byte code
for writing testcases in a healthcheck daemon, that had a bunch of legacy libraries it needed
now they could be changed by the sysadmin, without the need for recompile of software
and then oracle pulled the plug on Nashhorn with java 9 
@urban flint thing is, I can do development on macOS just fine with brew, since its bash and a unix system
windows just feels so flaky, as if its not designed for it in the first place
and linux, I can do development and also tweak everything on my system to my liking
i use windows in a VM occasionally and it is nuts how bad it has gotten, the popups the pushing of edge. how that doesn't violate the same thing they got busted for in the 90s is beyond me
the only macos version i currently have access to is high sierra and half of the brew packages doesn't even install lol
@urban flint my windows is stuck on version 1909 lol
thats before they took it to the extreme
but it does do shit like this if you search for 'chrome'
New
Launch Now
how the hell is that not violating anti-trust or some shit.
The idea you can customize everything on Linux is fine until you have to learn how to customize and you realise you would just prefer explorer.exe and whatnot
there's plenty of DE choices
yeah the "linux is only free if you don't value your time" thing is very true in my experience
@urban flint the problem is that there's no good defaults for the devices you want to install it on
when you buy an asus, acer or whatever laptop
it comes with windows preinstalled
and all the software to interact with the unique hardware, is built into windows programs
there's system76, and I think dell was putting ubuntu as an option for a while
@urban flint yeah but that is a unicorn in a field
^^ expensive AF
everyone is stuck into this ecosystem
where documents are word documents
and email is outlook
especially businesses
and microsoft is clever in this regard
office for mac only exists
so microsoft doesn't have to compete with apple
all the windows software is deliberately locked down, so you buy their operating system
libre office works fine for me. I usually just google what I want to do + excel and the solution is identical for libreoffice lol
@urban flint yeah thats not the issue
but the moment you send an .odp or .odf file to a collegue
this breaks appart
Do they not do pdf
that's not a document you'd edit, would you?
that's an interchange format
Windows is everywhere, everyone is used to it, and the moment it is slightly different, it upsets people
and the main problem with windows, is that legacy hardware and software, is no longer compatible
Well yea cos u dont wanna install new software lol
and if I buy something, I expect to be able to use it in 20 years lol
you can probably set docx as default format for libreoffice to save in
Can the libres not do docx and xsx or whatevrr excel is?
Well, just csv is fine for that part. But docx?
@peak acorn they can open microsoft documents and vice versa, but you get a lot of render issues
CSV is an open standard
I don't even use libre lol
I use LaTeX for documents
ah a man of taste
Yeah Kile is nice
I have to learn latex for my cs papers this semester q_q
@peak acorn for simple documents in pdf I use pandoc
it can convert markdown into latex, and then pdf with pdflatex
so you can do chapter headings with markdown like # Hello whatever
and by adding the -N flag to pandoc, it enables numbering, and at the top of your document you just leave a \tableofcontents
and it generates that too
markdown is generally easier for simple chapter constructs
and all the tex stuff you can put in a header file and load that with the document
but resource inclusion with images is just much easier
when you have diagrams that are generated as data output
you don't have to copy paste them into word every time xD
latex is just nice, because you can use it purely from commandline
I've used it in the past for generating reports in software
get nicely styled, but generated pdf documents
for invoices and monthly reports
and other things that people might want to print
@peak acorn also, if you ever need to write something for foreign markups
like a forum that uses BBcode or mediawiki's horrendous markup language
you can use pandoc to just generate that from a markup you prefer, like markdown :)
Bruh my college aint teaching me shit l0l
they only teach you the relevant skills to further teach yourself
thats what studying is
xD
even if you have a degree in software development, you still need to teach yourself
stay up to date with new tech, attend seminars and such
Yea bla bla i know i know but these classes hardly even teach
I can write poor c im pretty sure i could pass this class after a week or less of review
@peak acorn I had one teacher in college that gave me pandoc as a tip
since he saw me working on linux primarily
and he was one of the only teachers I know of that actually used linux on his primary system
all the others were windows or macs
My teachers are on macs
I saw my embedded hardware teacher try to install Windows IoT core on a raspberry pi
Lol
he had his laptop on the beamer after the slides were through
and everyone was tinkering with their electronics
I knew what kind of person he was when I asked: what kind of kernel does that thing use?
"why would I care"
he only cared about the runtime lol, which is .NET portable
Isn't mono on Linux .net?
I mean I would but Iām on a rpi
ty tho for the help
You can ssh in
Vscode allows remote ssh
So vscode runs a server on the pi, but the gui is on your machine
Oh cool
All the things i actually want to tey with tend to he a lot more eectronics than programming
But once i get started i hate electronics
Code good
@midnight wind you can do this without visual studio code
just saying, these tools have existing long before microsoft ever put them out
Yeah ik
I'm just familiar with this tool
@midnight wind microsoft has just after 30 years finally acknowledged linux
Because people want virusses
same lol
idk why
@marsh cobalt I broke my windows store install
lol
so I could remove the telemetry
oh ok
just yeeted a bunch of DLL's
xD
it still gets security patches
but no feature updates
I know that sometimes 2y ago
I disabled those fucking annoying edge search results
or bing search results
Maybe it affected this
I didn't evn know u can

I hate windows NGL
I like it over any Linux on desktop
I use it only because raytracing in games is not a friend with linux
Or at least, Wine does not support it atm
I dont rly care but i like using windos
I wish I could say that
I was researching gzip, and pretty much all implementations use on the fly server-side encoding.
But for static content, is there a way/point to storing it already gzipped and just serving the gzip file instead?
Automating a noise reduction filter presents two main issues. I found nice and "clever" ways of dodging those issues, I explain and try to vulgarize them in my latest video: š
https://www.youtube.com/watch?v=YAR4DRFxKU4
I'm automating the noise reduction filters applied on my audio tracks. This presents two issues, having to find an audio chunk containing only noise and having to deal with artifacts from SoX's built-in noise reduction filter. Fortunately, I found nice ways of dodging those issues, and I'm quite proud of them, especially the removal of artifacts...
There is a way to do it, it might make sense if you have huge chunks of text, like static HTML, text files, CSS, javascript etc. Some webservers (I know Apache for sure can do it) will server file.html.gz in place of file.html, even when the browser just asks for file.html. That will save bandwidth, disk space and CPU time. However, unless you are able to reduce the size substantially, and have a HUGE number of visitors, not much will be gained from precompressing the data. And for binary content, like image and video, the compression already applied, is usually so good that gzip will not be able to reduce the file much, I've even seen the resulting file increase in size after "compression"
Does anyone use grafana and prometheus?
I made a thing in the vien of taran's macro keyboard videos. Allows you to read events from only one keyboard and can execute commands/limited fake user input stuff (linux only I'm afraid!) https://github.com/sebastiansam55/uinput-macropad
I tried to document it well. Tell me if you have any questions/feature requests
honestly just need way more deskspace for more keyboards and usb ports lol
I have used them together, however that doesn't mean anything.
You guys are all smart
Why cant I import mysql data
@rancid nimbus lot of thirdparty plugins for a minecraft server rely on mysql as a storage backend
while some may do flatfile, others prefer an SQL db
@frigid knot does your data export include table definitions?
hello. I just wanna ask if someone is currently running a JRE 9
@rancid nimbus I tried to pm u but I can't. Anyways, so I installed JRE 9...But when I tried to check using java -version, it says its not installed lol
yah jre se 9
hello?
Is the path to your java exe in your $PATH environment variable? this is usually done automatically but sometimes isn't
eg. for the dotnet command for C#, i have the following PATH entry:
C:\Program Files\dotnet\
which points to the following folder with dotnet.exe
oh btw...im running Ubuntu 20.04 I forgot to mention :c
Hoping that JRE SE 9 also does that in ubuntu.
You need mysql if you are using bungeecord. And I figured out what was causing issues, apparently the .sql file is corrupt. So thatās great.
That's what I did lmao
and it detects nothing
ALREADY DID FINALLY LMAO.

I do not have any edge ad popping up