#ot1-perplexing-regexing
1 messages · Page 378 of 1
But still, that's a steep price
Cause I'd be comfortable spending 700-800€
What do you want to do with the desktop?
I mean, you can pay thousands of dollars to render videos in slightly less time or play the latest videos games in ultra high quality at 60fps, but if you're not going to do that, then spending the money may not even help you that much.
I'm quite comfortably coding on a very old laptop at the moment, although it doesn't run games.
For 700-800 euro you could get a decent machine that you could play a lot of games on and is certainly going to be plenty for coding
doing pixel art doesn't require much, coding depends a lot on which tools you use, pycharm is more hungry than vim, and games, well, there is everything, latest game at high end quality is going to cost more than 800€ for sure, but if you are fine with playing in lower quality or 5-10 years old games (there are excellent ones!), then you don't need to pay that much.
don't get a hdd get a ssd
I want to buy Macbook Air that pay ~1800€
if you want an underpowered machine that is very lightweight maybe get an arm android laptop maybe 😛 much less expensive
I use Macbook Air 2013 currently
Get a dell XPS
Or a matebook D 15/Matebook pro
same feel as the mac, more oomph
Also, only games I'm interested in are Minecraft and some roguelikes
MacOS?
Why would you want a Mac?
BSD made easy, is a common answer
Well
Even with the worse specs?
oh we're talking a specific hardware version?
i'd buy the higher spec windows laptop and put linux on it
I'm not knowledgeable enough, so maybe I'm talking out of my ass
I always hear that mac has crappy AF hardware
"The best 300€ PC you'll pay 2k for" is a common slogan
not really true
that's less to do with the quality of hardware and more the fact the value of the mac is in its brand / eco system

I always hear praise about its ease of use and its feel, but never of how powerful it is
According to a colleague of mine, macs are very good to use and very fast, but that's because stuff is super optimized there
good to use is a matter of what you're used to
they're pretty fast, i don't like macOS but others do. personal choice
as for optimisation... that should be the theory
macOS should only be running on Apple made products so it should work perfectly
¯_(ツ)_/¯
they're becoming harder and harder to make over time
and not exactly stable from what i hear
cheaper than they were
That might be true, but still. It's a very very hard financial decision to make, if it makes sense
i recently had the choice between windows and mac for my work laptop, without possibility to install linux
i picked windows, and i've been making the best out of WSL, i do have i3 fullscreen on top of everything, and i run almost all my software in WSL.
(as you don't have access to sound/video in WSL, i run zoom and spotify in windows)
zoom?
video conferencing software, it's all the rage these days, because it works quite well, it has problems, the security track record is far from stellar
but everybody uses it
it's the thing all the hip new cool kids are using to skype their synergy meetings
Interesting how much years I must collect money to buy this Mac Pro?
well to be fair those mac pro's are workstations
Ye
don't call them servers because they are not
I mean a colleague does hit him not me
they have a rack form factor though
it's a rack form factor workstation
it's a super expensive cheese grater.
^that's also accurate
right, but if you want to get picky about semantics, a server is a function, not a form
anything can be a server, maybe even an arduino, if you define "server" widely enough
yeah, but at £58k and all you're doing is using it like say, a rendering farm, it's a wastefully expensive "server"
i'm never really sure who those high end mac workstations area really aimed at tbh beyond like video editors and the likes
well, rendering farms can cost way over that i believe, for people like disney (and… oh they got all bought by disney)
perhaps for large scale app testing?
yeah, rendering farms cost way more than that one workstation
but if you were making a rendering farm you'd not use mac workstations i guess was my point
i could guess that but i don't know that, as i didn't build any rendering farm, so maybe the way to optimize cost is not obvious
I mean surely macs costs more on average?
Like, bang-for-buck is not in their favour
1.5t RAM
sweet, i can finally have discord, vscode, and chrome open at the same time
pkill -f chrome; firefox
@gentle moss Hm...figured out as much
I kinda want to drop learning C++ as a low level lang in favour of Rust
Rust feels more modern and more fun to work with, but oof can't really do stuff for the nes/gba/nds with it
rust is so fun
It is!!
But c++ sadly is more useful
if I could program nds/gba homebrew with Rust I'd do it, but..
@lime gazelle which bits specifically about C++ are more powerful?
and why not do a hybrid and be really modern
- idk about hybrid, I'm a newb
- for C/C++ there are devkits for gba/nds, so that makes it a lot easier
ahh right, yeah I guess that is valid
Rust feels way nicer to program with, but C/C++ has a baggage that's hard to deny
homebrow software for old game systems is not exactly at the top of the "useful" category imho, not that it's not fun, i truly believe it is, but it's going to be hard to have any impact on the world with that.
and i'm not even surprised there are rust people doing that 🙂
it's 3ds tho
Not wii or the ds or the gba
Which, imho, are more fun cause of the limitations
i must have misunderstood, you said c++ was more useful, and cited homebrew game dev as an example, it just doesn't strike me as the best example of usefulness
Sorry, my bad, I should have been more specific
C/C++ is more useful for homebrew
from my limited understanding of things, at least
Btw, I found this cool thing https://github.com/dddrrreee/cs140e-20win/
there is certainly more documentation and tooling, i'm sure it's possible to do anything with rust, but it's certainly not as popular yet, and while users seem extremely motivated, they didn't have the time to cover as much ground yet
the language seems promised to a nice future though
I agree, Rust feels way nicer
And youtube has loads of content like emulators being developed in Rust, which is super awesome
And that reminds me, I should finish the damn CHIP8.
It's very very hard to do a project and not know how things are done 😦
Logic is useless when you can't actually write the lang
Should I follow a tutorial or something? That'd be cheating.
why?
you can't just invent everything, reading documentation is an essential part of the job
Well it's not documentation. I tried using the chip8 docs.
But I got stuck.
And frustrated.
@lime gazelle felt that
I think I'll follow the live coding guy and try and really understand what he does 
oh, getting stuck and frustrated is also part of the job, but if you get stuck for too long, go ask for help, it's no use staying days on tiny things.
oh i can relate
i have a lot of abandonned stuff, some i poured months or even years into
and when i remember, i do feel guilt as well
but I'll finish it!
I hope.
With a tutorial, for sure. But that'd be cheating.
:I
breaks can be helpful. gotta let that emotion wash away...
i'm a year or so into a particular project, and i've found that once i tackle a stubborn part i need a break after finishing the solution.
you still learn from a tutorial, and when you feel like you got a good grasp, you can try continuing a bit on your own, and get back to it when you are stuck

Good call. But the CHIP8 is super duper easy according to people
If I can't do that on my own, I won't be able to do anything more cool
Anyway,
I have time to decide, there's the gamejam first!
!warn 657539751863123988 please stop DMing a staff member. they’ve told you numerous times to talk here instead.
:incoming_envelope: :ok_hand: applied warning to @solemn remnant.
Is it normal that time after time you start preferring one line code , or small codes ?
cuz i just wrote some code
you guys realise they have no roles, right
and i naturally went to oneline way and i felt it weird
I reported that in #community-meta
they’re DMing a helper so they had t have the role at one point or another
let me check with my alt
You don't have to have the role to DM users
Should I download obs if I only want to record desktop audio?
i feel something like audacity might be better/more lightweight
ive never used it but i imagine it can do that
Yep audacity is good
Although I like voicemeeter since it adds a bunch of audio control stuff I use
It just happens to also be able to record
Here
I recently went down the rabbit hole of Pi algorithms which was fun (I needed an algorithm which was pretty fast, and only used integers, which are between -9999 and 9999, and I found one)
I have no idea how people come up with those :p
yeah
okayy
unless n = 0
smh blame the nature making circumferences transcendental I guess
xd
okay can I drop some meme I got that I didn't get at first but then really liked it :p
no meme dump allowed on this server
yikes
so they are definitely watching us :p
well it is related to math and stuff
the beauty of it is that you never know
also I found this e algorithm that's really simple (code golf opprrtunity?)
I mean
if something is related to the conversation, it's tolerated, what's frowned upon is random dump
nope
nope
because it's divmod and not multiplication
(also it wouldn't be anyway because it isn't a range)
okay I found it
e = (n = 0; -> ∞)Σ1/n!
@sinful turtle this one ^
it works but ist is kinda heavy
yeah that's probably a bit shorter
though if you want to get a specific digit of e my one is probably shorter because it always gets 1 degit at a time
(also floating point rounding will cause problems)
yeah
I mean it works until you hit a double limit
>>> def e(n: int = 100) -> float:
... f, x = 1, 0
... for i in range(1, n + 1):
... x += 1/f
... f *= i
... return x
...
>>> e()
2.7182818284590455```
Anyways here's a meme I really enjoyed and it gave me some good thought
might seem kinda dumb at the second look :p
you could have put kuzko at the bottom, that almost works
haha
thanks
Will do if I have no ideas in programming
I have some interesting math equations I can play with though
oh yeah, as a side note, that pi algorithm I mentioned earlier uses no floats, and really small ints which is kinda cool
1000 digits of pi uses 66000 as it's highest number
(also you can do around 20000 digits without hitting the 32 bit integer limit)
Yeah n! is heavily exponential haha
(also, those things mean it's good for calculating pi in various esolangs that don't have floats which is cool)
well yeah I guess
though you could just divide it by 10**number of digits to get pi
yeah
on a completely unrealted note: someone was able to calculate ceil(n/sqrt(2)) using a regex
which is kinda insane
lmao
by the way
I just thought about writing an infinite float type
the idea is basically to have an integer and store the position of a point
maybe stupid but fun
infinite float type?
like a list of digits?
A decimal.
hm
!e
from decimal import Decimal
print(Decimal("445.23456"))```
challenge: make an generator that takes positive integers and returns digits of 1/a + 1/b...
(since fractions must be either recurring or terminating, I think that's possible)
decimal point?
I guess you could either ignore the decimal point or just return '.'
it doesn't really matter
>>> gimme_e()
Decimal('2.718281828459045235360287474')``` hm
I wonder why the last one is 4 and not a 1
Probs precision
yeah
Ah btw
Do you also hate those math questions where you do like hard stuff and in the end the answer is like 0 or 1?
yeah
I had to simplify a function which was like a limit of a defined integral
I had a maths exam recently where 3 questions in a row had an answer of 1
explosions can be scary
i have a new gripe
sites that render content like this
i have MORE SCREEN THAN THAT
i feel like firefox's reading mode would help with that
what's the site?
i'll see if it does
forbes commits many sins
in both site design and journalism
yet still is the king of SEO
firefox's reader view is phenomenal
had to read linux's documentation of the SG drivers earlier and it was in straight HTML, so i used the reader view to make it look all pretty and that
i struggle to read texts like that in a monospace font
too spacy and blocky, makes my eyes do too much work
i think at the end of the day it probably hugely varies person to person
of course
Ah, classic "ads bigger than content"
true
interestingly, firefox's reader mode removes the ads
most reader modes do
I wonder how they decide what counts as content
they are pretty reliable from what I've seen
i suppose it just looks for big blocks of paragraphical text
(paragraphical is a great quasi-word)
i guess world war 3 is coronavirus
@bleak lintel i feel like that format is solely to reduce complexity, so that mobile and PC are served the same content. still not much of an excuse; it isn't that difficult to extend for both.
I had problem gnome not starting at start in Ubuntu 18.04, I found that I should use sudo service gdm3 start. Now I don't have login screen and I have to use this command each time I boot. How can I fix it?
You can enable the service, so it will start at each boot
sudo systemctl enable gdm3
What are things you guys check daily or perhaps just frequently throughout the week? Weather, stocks, etc.
I'm writing a script that scrapes data and I'm interested in adding things/site to it.
Intersting netflix titles @gilded mica
pandora's box depending on region is that
I finished working
now I have time to focus on the chip8!! Wohoo!
Or, maybe I should just yolo os dev using a neat tutorial/stanford class? 
AAA too many things to choose from 
Is there a channel where I can just randomly ask a question related to python or programming in general? Thanks 🙂
help channels for more practical questions, and python-discussions for more best practice style questions
ot channels work too tbh
You can ask away! Ask your questions 
Not to me though, I'm a newbie
😮 you're blue!
why
are you buying it to collect & display or to actually use?
Use it, I guess. Although idk how much I would use it, to be honest..
probably a bad purchase.
id argue it is unless youre a collector
all that old hardware is gonna start failing soon
I agree 😦
But!! 100€ odds for an retro pc? Seems good 
Useless? yes. Cool? also.
Amstrad PC 1512. Seems very very cool.
not my kinda purchase haha
i have no use case for a pc that old, but to each their own
I think they're kinda neat machines to have fun with
the oldest thing i own is a 1988 lincoln mk. vii
but i can fix that if it breaks
i dont know how to fix electronics haha
C is the exact opposite of cool
i couldn’t figure out how to compile it. or even #include <std.io> or whatever i needed for a hello world script
it was brutal
im probably just dumb but
one of the most common errors to encounter when writing C is called UB, and it means anything could happen
short for undefined behavior
wdym C is the opposite of cool?
Everything is built on C
C is why we have cool things
C is why we have CPython 🤔
the language has a lot of old stuff which cannot be removed due to reverse compat
Rust is C but newer
Rust is C++ but cooler
a lot of languages are C but newer, Zig, pony, D, ...
TBH, there is very little reason to use C over C++ these days
that is why I said very little, not no
Frick now I'm torn between Go and Rust 😦
I'm using rust for the CHIP8. Maybe I should use Go.
Idfk.
Rust from what I heard is better, but it was people who like rust telling me that
I have a saying that summarizes my opinion of Rust compared to Go: “Go is the result of C programmers designing a new programming language, and Rust is the result of C++ programmers designing a new programming language”. This isn’t just a metaphor - Go was designed by plan9 al...
he has some very good points
I think his point is valid while Rust continues to grow and mature, but I don't know if we can have the same mentality 5 to 10 years from now
I kind of disagree with his implication that more features doesn't mean a more valid option. A lot of times, those features are going to be more solidly written and optimized than what most coders could hope to achieve through their own implementation, and with less risk of accidental errors and the like
This does also read like someone who is very classically trained and is only looking at the now rather than further down the line. Which isn't a bad way to look at things, I just think with what we've seen, the Rust ecosystem has a lot of potential that shouldn't be written off
Where is C actually used? Its very largely in embedded systems or places where memory is very important right? Then C++ is more used as a systems language which is also where Rust seems to compete
Agreed, that does seem to be the primary use case
There really doesn't seem to be a direct C competitor that stands out
used was probably wrong - where is new software/code being written in C? is more what I meant
most of OS development is still largely in C, even brand new operating systems
Sure - but for an OS is Rust actually a good replacement?
It could be
I mean, it is a system language
But the portability argument there is surely a winning factor?
I'd bet that the next popular OS wouldn't use C
Portability?
Rust compiles to most archs, right?
I say there's a 50% chance the next big OS will still at least run a kernel written in C
I'm talking about the arguments made in the linked article
C compiles on literally everything, an architecture can be considered nonexistent if C doesn't compile for it
It just seems to me that Rust isn't even really sold as a replacement for C - but a replacement for C++
to be fair, linux and such compilles on gcc with specific flags only, not that many people write pure C code
which the article doesn't contest
Like, for the example of an OS, pretty much everything in that article seems to imply that for the medium future, C would be a better choice
you want the 30 years of history
@graceful basin clang compiles linux since 5.5
oh, nice.
My own 2 newbs cents: Rust feels way nicer to work with than C or C++
And I get that, and I have no problem with it, but it feels like we just don't and won't ever have any other options
I don't know about technicalities, but a nice to use language is bound to become popular, I think
This is how it will always have to be and that's kind of discouraging to me
There's so much riding on C and everything that built it that there really isn't a way to start from the ground up again
And I get that, were you responding to me with that?
@plucky ridge which is why the next big language should be somewhat compatible with C
Assuming we have the native target, we can theoretically use any language we want, but most of them still target libc
like Rust is currently
Why is it being everywhere a problem though? It seems like it is pretty much fine
But musl-c shows that we can at least have an alternative to libc
It's the same beef I have with JavaScript and everything web based
Because damn never everything is going to go back to that one language, essentially
Any flaws, quirks, irritations that go with it will be present in any of its children or things based off of it
I'm not saying that C is flawed or is prone to huge issues, but the idea that there's no other choice just bothers me
Like if you want just above assembly, this is your option
I feel like the ending of this guy's article does a good job of summing things up C is far from the perfect language - it has many flaws. However, its replacement will be simpler - not more complex. Consider Go, which has had a lot of success in supplanting C for many problems. It does this by specializing on certain classes of programs and addressing them with the simplest solution possible. It hasn’t completely replaced C, but it has made a substantial dent in its problem space - more than I can really say for Rust (which has made similar strides for C++, but definitely not for C).
You do have other options, just none are as ubiquitous as C
Not as ubiquitous, well supported or held in the same high regard
but I don't see why you need to aim for the ubiquity
the thing with JS is that its the only option in a massive field
I can imagine you would get a look of disdain from other programmers if you tried to make anything significant out of something not C based
!otn a? 😄
Haha
Zig seems pretty nice tbh
so Should you (person, not you you) learn C nowadays?
!otn a hemlock's fussy butt
:ok_hand: Added hemlock’s-fussy-butt to the names list.
I might poke around some of them, but I don't know if I'd really be able to properly learn or apply those kinds of languages
Again, all my complaining is coming from someone with no previous C experience
Just looking at damn near everything relying on it or using it some how
i didn't exactly envision the call-out when i suggested it. sorry hem!
@pine vector Dude, I welcome goofy otns
learning C involves learning a lot of other things than just C. you learn about memory management, pointers, stack, heap, etc. it can be a very good beginner language, if you have the right learning material/teachers.
I'm having a nice time with Rust
solid foundations
I see it being better taught in a university setting rather than on your own
I think C would be kinda a step down
I disagree.
Understanding what's going on under the hood is important, especially when you can directly manipulate it for powerful gains and control
Isn't Rust just as low level as C++?
But I think you only should have to dive into it if you need that level of granularity
I mean I might, my objective is to develop a shitty game for something like an nds or a nes 
But again, if Rust can do anything that C++ can then should I really bother?
Then you'll absolutely need to know about memory management for an NES type game. Especially if you want it to actually work on one
Same could be said for most coding
Eh, but C has that pesky thing of "reinvernt the fucken wheel"
And no sweet cargo/pip 😦
Guess python spoiled me with "import X"
There's nothing stopping you from importing and using other libs written by others
i physically will stop you

Bulli
Jokes aside, yeah. Probably should give C a try.
:I now if only I could find some tutorials for the CHIP 8 using C..I learn best by doin suff I have no clue how to do on my own
:GWgoaThinken: so Should you (person, not you you) learn C nowadays?
@lime gazelle yes.
But it also heavily depends on what you want to do
at least to know exactly how pointers and memery management works
memory, even
but i'm keeping it
Like I personally wouldn't benefit overly much from learning it. Not because I know a lot, but because I don't do many projects that would warrant it
do emulators warrant the use of C?
very much yes
I don't know, I haven't looked for ones written in Rust
We're saying it needs that much power
rust is ok, but "safety" adds a lot of overhead which you generally don't want in emulators
Agreed, emulators need power
direct memory manipulation is also a lot, lot easier
But scary
Also, can't really find good tutorials/code-alongs for C
I've found one, an amiga emulator. C++, no sound, no explanations.
That sucks.
C != C++
@rough sapphire I know, I'm saying, that's the only C-family code-along I found, besides javid's one
I...will. Heck, probably shouldn't do an emulator for learning langs.
i think MIT might have a whole C class on opencourseware, complete with video lectures
But those tend to be boring, ngl
Although honestly, I'm really curious about working with Cython
It's not like, build a project usually
which I find really boring, because at the end of the day you have nothing to show. You have lots of theory, but no cool shabangs
there'll probably be some assignments you can do
and exercises
to go along with the lectures as homework
I'll snoop around then
Might be worth just, not being too rushy
Also I think C knowledge might translate to better Rust, but I might be stupid.
It... kind of will
How Rust manages memory is different to how you would in C
A lot of it is abstracted behind ownership and scope, where as C has a lot more direct manipulation of it
Also I always hear "Learn C++. You lern C as well, but it's better"
C++ is a massive language, C is not
C++ is a superset of C more or less, and as of such the syntax builds on C for the most part.
but there are a lot of things about C++ that are massively different to C.
I should specify, it's alays phrased as "the beginnign of C++ is just C"
a lot of practices in C++ that you would never use in C code and vice versa
C is like a box of legos that have only your standard pieces.
Like in the sense that for a beginner, C and C++ are the same
C++ has all of the more complex sets of pieces
They aren't the same
The syntax is slightly different, isn't it?
then it would be better to go for the cooler pieces?
I don't really know, I've never tried to study a lang before.
you can compile most C programs in a C++ compiler, maybe with some minimal changes here and there
It would be better to learn how to put the basic pieces together first
complex != cool
Learn the basics. Is it tedious? Yes. Does it sometimes get boring? Yes. But you will gain significantly more than trying to go balls deep in something more complex
Same with life
ye, C++ is big on C interop
is there a way I could make it more involved?
Like
Hmm
I feel that the most important thing when learning something is progress
Having something "cool" to toy with, like..it's boring to do a calculator. Sums are not cool and involving.
Okay, here's the thing
If you're teaching a kid how to play baseball, do you hit him with a fastball right away? No, you set them up on a tee-ball set
If you're learning to fly a plane, you don't put someone in a plane right away. They do hundreds of hours in simulators or on the ground
Same thing applies here.
Yeah
Could these people do these things off the bat? Possibly
If you are familiar with python, you can kind of simulate what you are doing in Python to understand some basic syntax and principles of C (with Python/C-API). You can play with python objects but at the same time you need to manage the memory, handle your errors etc.
I guess my point was: you don't make the kid swing the bat without a ball to hit
But it's also just as likely that they'll get discouraged
Sure, but you aim for easier targets
Yeah, and most basics are baseball without a ball
"Here are vars, here's how you sum"
And?
Have to tell a kid which end of the bat to hold
There's nothing wrong with that, it's part of the process
(I'll go take a quick bite, brb)
Also, yes, I agree. I...I'll suck it up.
Just have to find a course that works for me
The only reason I'm stressing it so hard is because it's incredibly easy to get discouraged if you go big first
"Whelp, I suck at this because I can't make a AAA game when I'm learning C++"
I don't know if all I'm saying is good advice, but it's what I've had to really force on myself in order to learn various languages
Could these people do these things off the bat? Possibly
@plucky ridge think the bat is pretty much required when it comes to baseball
I was under the impression that, since I can sorta hack python together, I could just hack my way to other langs too
But that doesn't really work
you really should not, especially if in the "langs with outdated stuff and bad errors" category
@rough sapphire You are dead to me. I didn't even think about that being a joke
There was a neat website that taught C
Very fast and concise, but maybe too shallow
once I timed a pure python encryption library vs one that uses C, 625x speed improvement for the latter
Does make me wonder what a Cython implementation or other variants would do
I know it wouldn't hit the C level, but still curious where it would fall in between
yeah that would be interesting to see
Cython is capable of doing great improvements but at the end there is still too much abstraction and every layer of it degrades performance.
Understandable
I'm looking online and everyone is like "Don't learn C, learn C++, it's just better"
I'm not knowledgeable enough. So Idk.
I mean there's always going to be debate about that
Traditional wisdom says to start with C
But honestly, some courses start with one, some the other
It just seems that C++ does everything C can
there is Rust as well, which more people recommend nowadays
But it's 100x more horrible
honestly, you already have programming experience, you will be fine either way
I'm trying Rust, but
it seems like it's better to learn the fundamentals
@lime gazelle that is kind of weird statement to say, any example of such a case?
Honestly what's more important than all of that, just pick something and stick with it
@lime bison https://www.reddit.com/r/learnprogramming/comments/49kpyj/is_learn_c_the_hard_way_really_learn_c_the_wrong/
2 votes and 10 comments so far on Reddit
@plucky ridge Eh that's a problem in general, ngl.
Also a C++ server I was in, everyone said "Just do C++"
there is 3 coments
Well here's another indicator
If you're asking a C++ server what they're going to suggest, chances are PRETTY good that they'll suggest C++
Eh it's not C++, it's both C and C++ it seems
If you go to a C channel, everyone will just say '**** C++'
But again, I don't really know what I'm doing.
Nor I know what, if anything, I want to do with it.
There's a difference between "cool" and "yeah I'll do that". And I think I might just be like "oh yeah, this is cool"
just do whatever you want to do, if you feel like you are walking in the wrong path just switch languages
it is not that hard to start over if you dont spent like 10 years
You said you were enjoying Rust, so stick with Rust
The only reason C and C++ came up was because of more edge case stuff. There's really nothing wrong with Rust
But you said C is needed for homebrew and emulators
And it's kinda true
Can't write a shitty nes game with rust
Ooh
And there are guides and other things specifically for learning about the NES setup
I..misunderstood
It's going to be a much different monster
You can pretty much do the same things with both C and Rust. Even if you are writing a kernel, rust is OK (but seriously dont do it 😆)
The language is too immature and changing far too much currently to be used for such deep infrastructure code, at least in my eyes
I could see it being used for it later down the line, but currently....
What matters is having fun learning if you don't plan on doing it for a job
If you're miserable while doing it, there isn't a lot of point (past the initial hump, I mean)
There's going to be some beginning step poopy stuff, but once you're in the meat of the language, if you're still enjoying yourself, that's a good sign
But honestly, the important part is just doing it. I do the same thing, though, I waffle between my options, hop languages, all kinds of stuff constantly
But the only way you make progress is to just keep at it
Does anybody know a way to convert a height-map (height values for a grid) to a 3d-model?
@plucky ridge well I'm not really learning Rust, more like "How to make an emulator using Rust"
I'm following a dude and do what he's doing, which isn't really learning I feel
Yeeahhhh it's part of why I don't like video tutorials, personally
My issue with video tutorial is that I can't go at my own speed
Yeah that's my main beef
know what
I have a series about a guy coding a roguelike in C
Guess I can watch that and judge if I like the lang or not
oh
I totally was in the wrong channel
I was just about to type, but it became active again. All I could think was the scene from Pitch Black. "Looked clear."
lol
Alright, I'm having queue concerns
I've got a reddit bot and a discord bot, each with a queue system in place for their tasks
I'm wondering if I'm doing it correctly in the discord one, (I suspect I am, but I'd like to be sure), and the reddit one is just a hot mess
but everything works
This was what I came up with for discord
It was more educational than recreational
Ignore the first queue, that was what I tried first.
It should just be that easy, right?
I see everywhere else, people are subclassing it. I presume it's because they're more complex tasks than storing a string, though. (rather, actual actions, I'm just thinking)
Yeah, no, I'm fairly confident now.
It might be better to ask this in either #async-and-concurrency or snagging an available help channel
yeah, i'm not well-versed enough in asyncio to help you out
I think I just needed to step it out once to feel more confident about it.
But for regular python, what would be a sensible approach to a queue system, for say, commands issued via comments in a subreddit?
I went with JSON. It became increasingly difficult to get right. And I don't know why.
Depends whether your goal is raw efficiency or just concurrency
Again, you're more likely to get better help by asking in the right place
f1re picked the channel. I just followed.
all his fault
Then again, I suppose I didn't exactly mention what it was I was going to ask to begin with. lol
hahah i thought it was just going to be a general brain picking
@sand goblet There is multiprocessing going on in the script, but I kept the JSON operations in only one of the two processes. I don't mind relocating to another channel if you have some insight.
Lol, sorry about that.
I don't have a ton - usually for a task queue I'd use an actual task runner like celery - but that can be overkill
I did it by hand. It's a weird system. The whole bot is a rewrite of the first version of it. The queue got added in the rewrite. It's just a simple !command type thing, with a cooldown that got turned into a queue system instead. Luckily, the overall performance of the bot is nearly twice that of the previous one. But I couldn't help but wonder if simply having multiprocessing in the script was causing funny behaviour, or if it was just me being messy. I used a class variable finally, and either that's why it cleared up, or it just happened to clear up because I was at it for so long
idk. it works, though I'm not exactly proud of how I did it. Maybe I'm worrying too much. We just replaced it yesterday with the new one
Actually.. now that I've stepped that out as well, I've got fresh perspective. Thanks guys. :P
which one is the real lemon??
This one --> 🍋
@tame oar we wrote a custom sandboxing solution called snekbox
It makes use of Docker and nsjail
Its basically an isolated environment?
so when the bot wants to eval it sends a HTTP request into this container and asks for the code to be run, then the container returns the code
yep, it is
it's got some pretty tight limitations on what can be done
I dont fully understand, like how does it isolate itself? Is it with the docker u said?
off the top of my head, we limit memory usage, pid usage, read only file systems
it basically runs python with the absolute minimum
python will work and be able to do things, but it can't change any files
and it can only run for a few seconds
6 seconds
nsjail is annother sandboxing tool
it just puts more limits on what a process can do
Hmm alright, im very interested in snekbox, gonna take a look at the source to see how it actually does its things, thanks for explaining 
no problem!
My current desktop:
@solid pollen sorry but it didn't work.
!otn a sleep-is-underrated
:x: The channel name sleep-is-underrated is too similar to sleep-is-overrated, and thus was not added. Use !otn forceadd to override this check.
!otn forceadd sleep-is-underrated
:ok_hand: Added sleep-is-underrated to the names list.
this channel name is overrated.
sleep is fine
Sleep is your life-support system and Mother Nature's best effort yet at immortality, says sleep scientist Matt Walker. In this deep dive into the science of slumber, Walker shares the wonderfully good things that happen when you get sleep -- and the alarmingly bad things that...
sleep is for the weak
this opinion sucks 
To make them strong
sleep deprivation makes you sick and stupid. read matt walkers book, it's eye-opening. you'll never pull an all-nighter again.
or listen to the peter attia podcast where he did a 3 hour episode with walker
nervous laughter
are you trying to tell me caffeine isn't a suitable substitute for sleep? pssht
check out this guy with all of his free time to sleep and stuff
I wish I had free time.
Or unless you run a community of 40k people :>
the time I spend here is time well invested.
that sounded maybe a little backhanded, wasnt my intention
even for my career. it's probably why I got the job I have
turns out running a big community for developers looks pretty good on your resume.
yeah thats fair
but oh man I wish the day was 30 hours
6 extra hours would be great for productivity here too
Although knowing me I'd just spend it playing on pycraft :v
sleeping for 8 hours every night feels terrible and stresses me out - such a huge amount of time not spent on productivity. but I don't want cancer or alzheimers and I want a good immune system, I want to prevent the effects of aging, I don't want heart disease, and I want my brain to actually turn the knowledge I consume throughout the day into learning.
so I guess I don't have a choice.
im lucky if i get 6, and thats with the nap in the afternoon
working less is more lived life or something
you should work on that. sleeping 6 vs sleeping 7 makes a huge difference. you are not alone, sleep deprivation is an invisible pandemic.
shut all my electronics off remotely lemon lol.. i beg
prob spend an hour on youtube in bed
I usually get more than 8 but that's because I sleep too late and then just fall asleep again after my alarm goes off
I got ~10h sleep last night, maybe a little less
yeah i usually sleep for around 10 hours
they say that using screens in bed is a terrible idea, both because the color of the light produced by the screen tricks your circadian system into thinking it's not nighttime and also because you're basically creating synaptic connections between the bed and non-sleep. You shouldn't eat or watch netflix or whatever in bed either, for the same reason.
~00:00 - ~10:00
i hate crumbs, so im ontop of the food situation haha.. but i guess i still have a nasty habit to work on
for ideal sleep conditions, your bed should be a dark, quiet, and electronic device-less place with a slightly lower temperature
noise is actually one of the few things that helps me sleep, concentrating on the hum of my ceiling fan for example
oh yeah, whitenoise can be great
some people like to sleep to music, too
I used to do that when I was younger
Hm, I have an echo dot in my room, but there's no screen on that
my kid isn't allowed to use any devices in bed.
cant do music but warhammer 40k lore on YT next to my pillow will put me to sleep too lmao
there's also this thing some medical experts are talking about called FoMO - Fear of Missing Out - which apparently has teenagers all over the world waking up 10 times every night to check snapchat or whatever so that they won't miss out on stuff that happens in their world.
idk why, i tried it with a few other things, only 40k works
Huh, I didn't think fomo was a legit thing, I've only seen it in domino's ads
i fell into some sort of noise limbo last night when i was trying to fall asleep. I had left the bedroom door open and could hear the fridge. I was half-asleep and dreaming, and suddenly started hearing this sort of really loud buzzing or almost like a chainsaw sound, which sort of woke me up - I was lying in bed, couldn't move, but could still hear the really loud noise. This lasted for about 15 seconds until I finally managed to bolt myself upright and the noise returned to normal, faint levels and I realised it was my fridge
that was really funky
doctors at work have been talking about fomo, so I think it's legit.
Yeah, I assumed it was when you said it
but I'm not a doctor myself, so take that with a entire fistful of salt
I don't think they teach fomo at med school exactly.
It's probably new
but I think there's some interesting studies on it
Domino's are constantly using it in their ads, like, use pizza to beat fomo
what
what the hell does that mean
I have no idea
it makes sense if you dont think about it 
fear of missing out.. on pizza?
They came up with this jomo thing for their campaign - the joy of missing out
i guess
i actually really like dominoes, but i dont trust anyone to cook my food right now
bummer
Their advertising is really annoying
the coupons at least are a good deal imo
I ate a lot of dominos in ireland, but I kinda think their pizza sucks here in norway.
just feels.. dirty.
I like their pizza over here at least but I haven't had it in a super long time
its for sure not healthy haha, tastes fine in the states though, at least where im at
we just have many better pizza places here.
We ran out of supplies a couple times so I've been like
Yeah it's the second best I can find in Ireland
what's the best?
It's the closest I've seen to the pizza we could get in Rome
right, a local place is almost always gonna beat the chain
italian style pizzas are superior anyway
Damn straight
Sometimes I wish I did culinary stuff at uni instead of CS so I could work there haha
I mean who doesn't like free pizza
willing to bet youre better off down the road as a CS major
though i dont work in that industry so i have no idea
If I'd passed, yeah, maybe
hahaha
hahaha oh
yeah man, soon all pizzas will be crowdsourced to twitch.com/twitchmakespizza or something and all the pizza chefs will be out of a job
better off writing code
:>
depends on the employer
wasnt trying to say pizza is a dying uhh.. "platform"?
generally: no.
I'm sure some do, I guess most don't
code vending machines?
we have one at my station that dispenses cup ramen, weirdest thing ive seen in a vending machine
Like you press the buttons for the toppings and it cooks a pizza for you in a matter of minutes
Never seen one in Ireland though
That is a little weird, but maybe it's one of those snack ramens
There are ramen packets that are meant to just be eaten like crisps
nope, you need a fork and hot water for that haha
when i was a wee lad i used to eat regular ramen like crisps
would crush em up a bit, put the spices in the bag, shake em up and eat them
A lot of teenagers in places like South Korea would do that as well, so now they make ramen that's intended for it
i used to bring entire boxes of cereal to school and me and a buddy would spend our lunch money on milk, roll the inner bag down, pour the milk in and just eat it out of the bag lmao
i think thats the most bizzare and unintended way of eating something i ever did
think the strangest I've done is eat spaghetti out of a large ziploc bag at a camping trip once
That.. That's pretty strange
I think the worst I did was eat taco fries without any utensils because the chip shop didn't have any
Walking down the street with this giant pile of fries, mince and garlic sauce, and one hand covered in it haha
It was acidic enough to eat through the container it was in as well so I had to bin it before it collapsed
ramen crushed up is delicious
It's great in salads
Something like https://www.lachoy.com/sites/g/files/qyyrlu341/files/images/products/chow-mein-noodles-87347.png is great in salads too 😙👌
i used to eat those straight out of the can... 😋
Good stuff
In the chip8 is it wrong to assume that I, which points to memory, and the PC are the same?
Cause the PC has to point to memory too to get the instructions
and to do so it needs the same value as I? or vice versa?
sorry if it's a stupid question, I'm reading the docs and they seem intertwined
hey
so in this site - https://www.horsepaste.com/
two people on the same link can click stuff and it automatically updates for both of them
how do I make something like this with flask?
looks like there's clientside javascript polling the backend until it times out or the server responds
can I do it without js?
no.
Do I need to do a lot of javascript to make something of the sort?
not particularly
Like I don't know js, do I need to go in-depth and learn stuff?
i imagine there's libraries that do a lot of this for you @velvet rapids
you got any links?
i'd personally use websockets instead of polling requests like this site does
so websockets + flask
you'd still need javascript on the client side to actually do websockets and update the page
hmm k thnx
Since I added a swap file to my computer, the hibernate function appeared on the start screen, does it have anything to do with it, just out of curiosity?
yes
the machine's state is saved to the swap file/partition
it's how hibernate works and how you can remove power entirely
as opposed to sleep mode, which keeps machine state in volatile memory
when a system boots up, it first checks whether the last shutdown was a hibernation. if it was, it tries loading everything from the swapfile back into memory again
hey im looking for a reliable cheap vps
which vps do u guys recommend for discord bot
i never thought my laptop could hibernate. After reading this message i tried hibernate option and it worked. First time i hibernated (not me my laptop) i was shocked. Previously hibernation didnt work
@rough sapphire Linode, DigitalOcean, and OVH are some good options
not really considerate to bother staff like that
No just testing if he is seeing my message
I m not pinging him though
@rough sapphire u are a ethical hacker?
yes.
Oh yes
First time i know someone of my kind in this server
When i shared a writeup here i got msg from ves zappa
Saying its not good
Hacking is illegal and all that stuff
I'm not just a hobbyist. I have a hons degree in "Ethical Hacking and Network Security" and am currently employed as a pentester / security expert
But all pentesters, bug bounty hunter , i feel close to them
thank u @rough sapphire
@rough sapphire could you do something about the failure of democracy in the west? pls
lolno
whyyes
hack putin or something
i don't dabble in politics
really not my thing
was seriously considering joining the army to help them combat disinformation
and whatever the heck they do
that feels like the only reasonable thing to do
i need help
it says my download speed is 42.89 mbps, while upload is 35.57
how fast would you guys rate this?
pretty alright
its not 2020 "Super Speed"
but it'll handle day to day use easily
downloading big games might just take a lil longer than being on gigabit xD
it says my download speed is 42.89 mbps, while upload is 35.57
@rough sapphire i have 1-3 mbps at max
@small fossil
what do u consider fast speed
idk any of these terms 😂 or how to translate
would you consider 100 mbits fast?
Like anything over 10mbps is "quick"
oo
and will handle most stuff
ok i see i see
how would you translate 100 mbits to mbps for me?
idk what are mbits
mega bits
8 bits = 1 byte
wtf
1000 bits is not 1 byte lmao
1024 byte = 1 kilobytes
that is a kibibyte
1024 kilobyte = 1 megabytes
Oh no
I wrote 1000bit = 1 byte
Fucking weed
Lol i feel like i m in trance
that is a kibibyte
@small fossil lol
Lmao
1000 Bytes -> 1KB (Kilobyte)
1024 Bytes -> 1 KiB (Kibibyte)```
Lol

Hey @rough sapphire!
It looks like you tried to attach file type(s) that we do not allow (). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
Hey @rough sapphire!
It looks like you tried to attach file type(s) that we do not allow (.txt). We currently allow the following file types: .3gp, .3g2, .avi, .bmp, .gif, .h264, .jpg, .jpeg, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .png, .tiff, .wmv, .svg, .psd, .ai, .aep, .xcf, .mp3, .wav, .ogg, .md.
Feel free to ask in #community-meta if you think this is a mistake.
!paste use this for text
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Yeah it's kind of pointless to have to download a file to view text when we have services easily available for it
Dumb question: what do you guys think would be more interesting to watch? A guy coding a Gameboy emulator in Rust or a guy building a Roguelike in C?
I can't decide what to watch.

Help I can't be stuck in deadlock
that's a hard decision
i know C a lot better than rust, so i'd personally go for the roguelike so i know what's happening
Rust is more understandable for me, but Roguelikes are cool
and have very interesting mechanics and algorithms
to be fair, i've only seen rust code about 5 times haha
a gameboy emulator and roguelike are both very cool though
yah
It's a tough call. I mean I'll watch both eventually
just have to start with one
hmm
Never heard of them
I don't like his explanations
He just always sounds so unsure and not expressing the right safety practices
@lime gazelle You can write an emulator in one language, then write a roguelike game in C that would run on that emulator.
I really don't like the lack of precision, I guess
Just something about it bugs me in the back of my head
@shell raptor Oh I'm talking about what video to watch, that sounds like a hard time
@plucky ridge I'll check out NurdRage
also cody's lab is very fun
It's a lot more dry
NurdRage I mean
Like more like a chemistry class
But I like it for that reason
nerd
You know it
@lime gazelle You can still write a gameboy emulator :)
@shell raptor I'm working on a CHIP8 emulator and it's giving me a hard time
But I got the roms to decode so I'm happy about that
But I'll switch off from it for a bit and learn Rust proper, that will probably make things easier
Same sort of thing for me.
I plan on rewriting my backend prototype from Python to Elixir.
never heard of it 
It's like Erlang, but you can drink it.
you can drink anything with enough determination, it's what we invented blenders for
Erlang is a functional programming language made primarily for distributed systems.
so like Haskell but for the cloud?
Well... It's quite different from haskell.
Elm is Haskell for web with weird restrictions, though.
Haskell just feels strange to write
I don't like it
Everyone is like "Haskell is fun". No. It's stupid.
It's maths disguised as programming
but less cool
I like algebraic data types a lot, though.
you like maths?
I do, but that's unrelated to algebraic data types.

