old thread: What are you working on, Sup Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
github.com
github.com
pastebin.com
addons.mozilla.org
pastebin.com
reddit.com
bbs.archlinux.org
forums.linuxmint.com
wiki.archlinux.org
researchgate.net
github.com
seriot.ch
twitter.com
Recommendations for C++ webinars?
There, how's this?
Just implemented it after I posted and tested it. Seems to work!
...would've posted like 15 minutes sooner, but it was crashing and I was in release mode, then I had just done a refactor on core classes so building in debug took forever...
..turned out one of my dialogue files was simply using 'choice' as an identifier already :^)
ie
choice = fork("Inspecting your body", "We're going to have sex", "Ssssh")
if (choice == 0)
msg("\"Okay\"")
else if (choice == 1)
{
msg("She looks up at you innocently and asks \"What's sex?\"")
}
Durrr...
Basically
choice "Rape her?"
{
option "yes"
rape()
option "no"
pet()
}
gets turned into
msg("Rape her?")
switch (fork("yes", "no"))
{
case 0:
rape()
case 1:
pet()
}
That's pretty cool. You also implemented it really quickly.
Your game sounds interesting. You mentioned that you'd release a pre-alpha demo soon?
>You mentioned that you'd release a pre-alpha demo soon?
Yeah. I'm releasing one in (late?) December.
>You implemented it really quickly too.
Half the time was just debugging my stupidity of not realizing that I had possibly used those new keywords as identifiers before... (since the release build was basically giving me zero info).
I mean the parsing is basically the same as what I was doing for switch/case. I didn't need to create any new unique AST nodes. just new tokens for the 2 statements and then copy/pasted the switch/case code and modified it with a few extra function call + etc AST nodes
Do you have any plans for how you're actually planning on releasing this game?
I think your only option is to self-publish like that german loli VN, because nobody is gonna want it on their storefront.
I'm a coding brainlet trying to make a card game
What the fuck is DevOps?
Why do I need to know it? And how do I learn it?
Any good games written in C++ that I can read the code for as a learning exercise?
It means full stack developer + sysadmin
I hope you like doing 3x the work for the same shitty entry level pay.
Sounds like the kind of job where you hold the company by the balls.
Not really, they can fire your ass and replace you with someone else pretty quickly because they have like 2000 applicants for every position, it's an employer's market
I'll do exactly as I always have (I put out 2 demos before). Release it anonymously on imageboards/etc for free (likely always with full source code).
What kind of game? My game is C++ (SFML for graphics).
What are you trying to learn?
Some kind of complete, published, and well received game with open source written in C++. Doesn't really matter what specific genre it is.
Oh shit, it's lolidev. How's it going, man? You think your game'll be completed before Yandere Simulator?
Doom 3 is GPL and is pretty well regarding in terms of code quality and game quality..
No. Yandere Simulator has an expected release date of 2019, while Sim Loli has an expected release date or 2023.
github.com
github.com
Knock yourself out. idSoftware has lots of good shit. Check out Quake 3 and DOOM 3, keeping in mind that they're over a decade old, so there's more alternatives now (SDL, OpenGL, Vulkan, etc).
anything by herb sutter, that romanian guy (alexadrescu or smth) and matt godbolt
all those name are probably wrong, but they are close enough
Thanks, guys. I'll look them up.
>use open with addon to open shit in mpv
>couple days ago it just stops working and disappears
>icon in ff still there
>in settings mpv option disappears, thing on the right says it needs another script to work
>links to
moz-extension://a1a6299c-8a33-4213-abd1-2c4499dae43a/native/open_with_linux.py
idfk what this link even is, heres a paste thing link pastebin.com
is this shit botnet? it seems sorta botnet to me.
install mpc-hc
I use linux, and the media player isnt the thing in question. Its a firefox addon to open stuff with other things.
it adds an option in right click to open a link or tab in another program, but its broken now and wants me to install this thing referencing a site called "darktrojan" and the script is talking about downloading, connections, pings, and I think executes.
really weird because I thought this addon was legit.
>wincucks ITT
Go on. Read your SICP. It's just a book, it won't bite.
yea, thats the thing I was using. It doesnt work now and I didnt update anything, I even have ff updates blacklisted. there might be a back door update in the addon and the code got changed or soemthing but its not working for me now and its bitching about needing that python script which is super sketchy
need muh games. If it were up to me, I'd only be using OpenBSD
gaymes run fine in a vm with hardware passthough.
Script looks fine
pastebin.com
>need muh games.
The only 2-3 times I ever turn on steam in a month is for playing shitty online racing games and linux has had it since ages
I guess i should tinker around with it someday. But I also need cross-plat for my libraries that will definitely be finished someday.
then you don't play enough games.
why does it have to be well received if you're just learning? good chance lolidevs game may not be well received(by nature of the content only) but from what I can tell it would be one of the best games for you to learn from
>then you don't play enough games.
No one does, if gaming is your prevalent activity you are in the wrong board
qemu+kvm.
if the libraries are cross platform then they should be fine on linx too, no?
qfusion, warsow uses it
kge, legend of persia was made with it
Thanks lad, i'll check 'em out.
I know this is not strictly programming related, but I don't wan't to open a new thread just for this.
What are you guys about:config like in ff?
Let's say the game was a buggy mess or the physics in it were absolute trash or the menu system was a steaming turd... While we can agree that things could be learned from it, I think we can also agree that there are likely better examples to look at.
I'll add them to the list. Thanks!
>t to open a new thread just for this.
im sure there's a million ff threads up.
Employed Haskell programmer reporting in
Employed Malboge programmer reporting in
does your manager at mcdonalds know that you use haskal?
信じられない
I think kvm is a linux thing, dont know if it works on bsd.
youre going to go through hell getting it set up.
you need two graphics cards, an igpu will suffice for the host. black list your nvidia/amd card, vfio bind it, and pass that shit though to the virtual machine. you need to start the vm without the card at first, do all the updates, and then start the vm with the card and install the drivers. nvidia blacklists their drivers from working in a vm, there are work arounds.
use usb passthough for you mouse and keyboard. use ovfm for the bios, this enables use of efi operating systems. in the spu settings do something like -smb 4,threads 1 so that you use 4 threads on your REAL cpu and the virtual machine shows up as having 4 cores.
I pass through a 1060 and a usb card to the vm and use my vive in the vm and dont notice any penalties to performance.
bbs.archlinux.org
forums.linuxmint.com
wiki.archlinux.org
do mostly the steps in the first link, reference the arch wiki in the third link. I seem to recall one thing on the a green website that helped me, I think its what I linked to in the second link.
this is by no means simple, and is often complete bullshit. what I provided should be enough to atleast get you started in the right direction.
Guaranteed replies
wew, already, saved all of that, appreciate the info.
Im bad at this, what Im trying to do is simple: print a string from a class with sinatra (i think that's how you put it?)
Anyways, I'm trying to make a server status script to learn, I was able to make this
require 'sinatra'
Stets = Status.new
get '/' do
@ram == Stets.ram
@uptime == Stets.uptime
erb :status
end
class Status
def initialize
print "ok.... \n"
end
def ram (which = 0)
ele = which
ramget = `free -m`
fetch = ramget.scan(/\d+/)
usedram = fetch[1] #self explanatory
maxram = fetch[0] #available
if (ele == 0) #pretty ram usage
return "#{usedram + '/' + maxram}"
elsif (ele == 1)
return "#{usedram}"
else
return "#{maxram}"
end
end
def uptime
uptimeget = `uptime`
fetch = uptimeget.match(/up(.+?),/).to_s
fetch.gsub!("up", "")
fetch.gsub!(',', '')
return "#{fetch}"
end
end
I don't see any errors when running it except for the fact that @ram/uptime are not being printed at all, holy fuck:
my erb file
Server status
RaM
Uptime
and what I actually get is nothing between the tags, does sinatra have an option to be more verbose?
What I actually endup getting is this:
Server status
RaM
Uptime
>webdev shit
i have played it (v0.2) and it most unoptimized piece of shit that was ever executed on my computer
yea no problem. its a fucking bitch if youre new to all of this.
also for audio, for ME, you need to do
-soundhw hda \
when using a vm without a graphics card so the auido isnt all sparkly.
soundhw ac97 instead (no hda) if you areusing a graphics card.
-usbdevice tablet \ makes mouse movements unfucked
-no-quit \ disables alt+f4 from closing the hypervisor when not using usb passthough for the keyboard.
usd a bridged network setting to have not-shit internet and have the vm show up in your home network like a real device.
do not use q35, its broken and is a peice of shit. I need to use it sometimes for an install, but then after install the vm hangs at starting windows and I waste 2 hours doing the same shit until I relearn q35 breaks the vm.
it would be wise to mound the bios file as read only.
Ill leave the rest to learning experiences, protip: theres a dozen ways to do everything including specifying what protocol a virtual cd drive or harddrive uses.
it's pretty evident by his code, and SFML is a little bloaty
It's probably largely due to the fact that I wanted the entire town to be simulated at once, rather than settling for lower-detailed approximation to off-screen events. (or having lolis be de-spawned when outside the view, etc, since they're unique and everything).
What were you running it on? Runs fine even on my low-spec laptop.
>there are people in this thread, who can't appreciate this
fucking rustlets, when will they learn?
template struct Frak {
static const long Num = N;
static const long Den = D;
};
template struct ScalarMultiplication {
typedef Frak result;
};
template struct MCD {
static const long result = MCD::result;
};
template struct MCD {
static const long result = X;
};
template struct Simpl {
static const long mcd = MCD::result;
typedef Frak< F::Num / mcd, F::Den / mcd > result;
};
template struct SameBase {
typedef typename ScalarMultiplication< Y1::Den, X1>::result X;
typedef typename ScalarMultiplication< X1::Den, Y1>::result Y;
};
template struct Sum {
typedef SameBase B;
static const long Num = B::X::Num + B::Y::Num;
static const long Den = B::Y::Den; // == B::X::Den
typedef typename Simpl< Frak >::result result;
};
template struct Fact {
static const long result = N * Fact::result;
};
template struct Fact {
static const long result = 1;
};
template struct E {
// e = S(1/n!) = 1/0! + 1/1! + 1/2! + ...
static const long Den = Fact::result;
typedef Frak< 1, Den > term;
typedef typename E::result next_term;
typedef typename Sum< term, next_term >::result result;
};
template struct E {
typedef Frak result;
};
int main() {
typedef E::result X;
std::cout
You may want to look into lazy'ing some things regardless.
Enjoy having no project manager, cuck
Well, for pathing I've considered it (which is a large amount of the runtime when I profiled it - although I have pathfinding running on separate worker threads async).
Also, since the 0.2 demo I made the city significantly smaller since I felt the city was too same-y, so that should alleviate things a lot too.
But yes if other people are having trouble running it I could probably do something like that.
I think I'd have to for any time-skip functionality (ie teleport loli to X location based on how far though the day she is).
>all those typedefs
>all those cons
>all those typenames
I almost want to rewrite this to see what it would look like in non-shit templates.
It's still good anyway since I imagine your scope isn't getting any smaller.
In D, is "this" a pointer or a reference?
>his language can't provide compile time randomness
researchgate.net
depends if it's a struct or class constructor.
Which one's which?
classes are reference types, structs are value types.
And sometimes this can be a "Voldemort type", which in D is basically "only the compiler knows, but you can find out if you really want".
D is truly Disgusting.
How?
You usually won't run into VTypes unless you're doing some really C-level hackish shit. The average person will probably never run into them.
Got it, it's a reference.
rewriting the security critical parts of the linux kernel in x64 assembly
Coroutines are so fucking good.
>his language can't implement parser for some other language at compile time
any javascript experts here?
const arr = new Uint8Array(someArrayBuffer);
is that actually just a pointer to the existing array buffer and sort of a set of instructions for how to use that buffer? or am i making a copy of that buffer?
>new
what do you think faggotron?
Anybody ever used flask for serious business? There's a bunch of objects (logger, orm, message queue) that I wish to share between all the blueprints but I've no idea how to do it in a safe/correct way.
hello lisplet
some people on here unironically run 256mb ram systems, don't worry too much about it
JSON parser in C
why not just use library
>tfw idling at 9GB right now
void foo(int xparam)
{
int x = xparam;
void nested(void)
{
printf("How come I can read %d?", x);
}
nested();
}
C/C++ can't use libraries because they don't have any standard library/build management mechanism
What the fuck are you rambling shitter?
i don't know, i'm not actually sure that "new" in javascript works like it does in other languages. it would make total sense for that arr to just be a typed pointer to the existing memory and not, basically, malloc a new memory block of the arraybuffers size and then memcpy it to that new block and return a ptr to that new block. especially given how arraybuffers work, it's expected that you turn them into a typed array of some sort.
i.e
const arr = new Uint8Array(someArrayBuffer);
should be
uint8_t * arr = reinterpret_cast(someArrayBuffer); // someArrayBuffer = void*
It's true though. Why do you think cniles avoid using libraries?
they don't.
...
writing != returning
does linux and windows binaries use the same instruction sets?
no
Write a function that will count the number of repeating digits in my post number and check them
#include [blank]
That just copies and pastes the content of the blank. Does nothing to do with dependency management
"no dubs, loser".writeln;
> MUH SPOONFEED
"C/C++ can't use libraries because they don't have any standard library/build management mechanism" platinum /dpt/ quotes, 2017
seehe was baiting for a spoonfeeding.