[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 313
Thread images: 37

File: the_donald.jpg (382KB, 1300x866px) Image search: [Google]
the_donald.jpg
382KB, 1300x866px
What are you working on, /g/?

Old thread: >>60590586
>>
First for Rust.
>>
File: true_int.jpg (81KB, 637x492px) Image search: [Google]
true_int.jpg
81KB, 637x492px
>>60594100
AS3 is best language
1, 1: true
2, 1: false
2, 2: true
1, 2: false
>>
File: parser.webm (266KB, 858x495px) Image search: [Google]
parser.webm
266KB, 858x495px
Working on a list like interpreter
>>
>>60594123
W-why?
>>
>>60594134
Because this is a thing:
(12 == 12) == true

sometimes outputs
false
>>
Hey /dpt/
I've got an internship at a software engineering company, and they've assigned me to write the bootloader for an embedded device, running on a Kinetis ARM processor. I've never done any real embedded work before, although I have written a fair amount of toy programs and games in C.
Does anyone know how to make the GNU linker put a certain static library (i.e. a .a file) between two addresses? I've been reading the linker manual and a lot of it's really fucking complicated. I need the .a file to be our main application code, where the bootloader can overwrite it (from an external source) while running. Am I going about this the wrong way? Any resources on the subject would be appreciated.
>>
>>60594129
Hey, that looks pretty good! What's next for it? Maybe defining symbols, or lambda expressions?
>>
Is there a better way to do this?

    pub fn find(&self, name: &str) -> Option<&Entry> {
// ...
}

// Don't want to duplicate code, do an unsafe cast to &mut T
pub fn find_mut(&mut self, name: &str) -> Option<&mut Entry> {
if let Some(entry) = self.find(name) {
unsafe {
return Some(&mut *(entry as *const Entry as *mut Entry));
}
}

None
}
>>
>>60594129
>list like interpreter
Nice, but it's really a trivial thing to write, there are more lisp interpreters on GitHub than lisp programmers in the world. Try writing an interpreter for a language with a syntax next time, it's more interesting.
>>60594156
AS is a variant of JS, isn't it? It means it doesn't have integers and every number is a double, meaning all you have to do is to use some epsilon to compare two numbers, there's no need for all these horrors you've written.
>>
>>60594196
Not that guy, but I like writing LISP interpreters, you can spend time adding language features, rather than wrestling with a parser generator
>>
>>60594196
It does have ints, its an ECMA dialect, yet its made especially for games and shit, so types and type safety is pretty good.

Its just that the bytecode sometimes fucks up, those checks fix that issue

Its hardly useful 99% of the time, but for shit i really need to get right, its a lifesaver
>>
File: parser.webm (105KB, 584x360px) Image search: [Google]
parser.webm
105KB, 584x360px
>>60594189
Even better, see pic related
On a more serious note I'll probably do more symbols, environments and lambda
>>60594196
It's the first time I write something like that in C, it's better than the retards posting fizzbuzz
>>
>>60594190
>Don't want to duplicate code, do an unsafe cast to &mut T
Why the fuck would you do that? Do you use const_cast<> too?
>>
>>60594190
Holy shit shit language is disgusting
>>
>>60594251
Why? because I don't want to fucking duplicate my searching code maybe?
If you know how I can do that without doing unsafe stuff, I'd love to hear it.
Try properly reading the posts you respond to before you respond to them.

I'm sick of people just skimming posts and responding with something retarded and making an ass of themself, it happens way too often here.
>>
>>60594289
I've read your post and you being lazy isn't an excuse for writing unnecessary unsafe code. I can't give you a concrete advice without knowing the context, but Maps in the standard library don't use unsafe for this: https://doc.rust-lang.org/src/std/collections/hash/map.rs.html#547 .
>>
Is there an image editor that is somewhat ignorant of it's frontend? Like xi-editor modular structure. Or is it impossible for image editor to be efficient and not rely on specific frontend shenanigans? I am gonna look into aseprite later, at least it supports allegro and skia
>>
>>60594320
>but Maps in the standard library don't use unsafe for this: https://doc.rust-lang.org/src/std/collections/hash/map.rs.html#547 .
And Maps are very different to what I'm doing.

I just have a simple find method that returns a reference, and I want a mutable version of that to return an mutable reference.
You're basically saying I should implement the same logic twice, every time I want a mutable version of a method. Fuck off.
>>
>>60594289
No, what you did was ignore my original question and offer bullshit. My six ITS certs give me a comfy understanding of hardware and firmware. I know some assembly stuff as well.

I was asking for programming projects in some relation to my current skill-base.

Your solution read like: "Hey, I know you're an active programmer using some of the industries top-used languages, and your question was asking for projects possibly related to said languages, but instead I'm going to offer the idea that you should ditch those interests and pursue an entirely different language that you have already worked with in college, but maybe this time you should really go deep with it. Otherwise, give up on being a real programmer."

Man, I was just looking for more serious side-projects to work on. My job has me developing software for a medical information system, which is cool and all, but I wanted to see if you guys had any ideas of what I could write, at home, as a more involved project. Instead, I got shit.

Oh well, back to the Stack Exchange / Reddit. At least the levels of glorified smart-ass are a bit lower on those sites.
>>
>>60594350
>what you did was ignore my original question
Your "original" question was irrelevant. No I don't fucking const_cast

>and offer bullshit
Huh?

>Your solution read like: "Hey, I know you're an active programmer using some of the industries top-used languages, and your question was asking for projects possibly related to said languages, but instead I'm going to offer the idea that you should ditch those interests and pursue an entirely different language that you have already worked with in college, but maybe this time you should really go deep with it. Otherwise, give up on being a real programmer."
What the FUCK are you talking about? Are you even responding to the right fucking post?
>>
>>60594381
it's a pasta, anon
>>
>>60594391
oh
>>
>>60594347
Well, you could start with explaining what it is you're trying to do besides two empty methods.
>You're basically saying I should implement the same logic twice, every time I want a mutable version of a method. Fuck off.
No? I'm saying you should look at the standard library does it without unsafe, before being a dumb C-toddler and casting constness away.
>>
>>60594404
>I'm saying you should look at the standard library does it without unsafe
The standard library also does some pretty fucking stupid things too, like wrapping what should just be a simple return into some hackish wrapper object just to abstract around the mutability vs immutability. Your map link is a good example.
I refuse that level of complexity. Keep It Simple, Stupid.
>>
>>60594100
How do I start with Haskell?
>>
>>60594460
> wrapping what should just be a simple return into some hackish wrapper object just to abstract around the mutability vs immutability
It's not stupid as long as it increases safety without producing any run-time overheads.
>some pretty fucking stupid things
>hackish
Said she, silently casting constness away.
>I refuse that level of complexity.
Why do you even bother with Rust then? There are plenty of languages for ones like you.
>>
what are some good resources for learning APL?
>>
>>60594528
pac-man for ants?
>>
File: 2017-05-26-152755_870x943_scrot.png (30KB, 870x943px) Image search: [Google]
2017-05-26-152755_870x943_scrot.png
30KB, 870x943px
hey guys, guess the game i am working on

(fixed ≧◡≦ )
>>
>>60594505
>Why do you even bother with Rust then?
Because C is extremely unproductive for userspace.
C++ is terribly designed and shit to use.
I've used both of the above for years btw, wrote a kernel in the latter.
I really like Rust and it's ideas but the safety can really get in the way some times.

Honestly I think the immutable by default thing is pretty unnecessary, and not a source of bugs.

I'd like a language that has traits, pattern matching, enums as tagged unions, a good toolchain, not garbage collected, RAII, rivals C in performance, modules, and can write a kernel in it, but doesn't care about safety.
Ada is completely out of the question since it has trash syntax and is ancient and unused.
>>
>>60594100
>mfw i found out knuth was from my hometown
based
>>
>>60594580
> I'd like a language that [...] doesn't care about safety.
Stop being a whining pussy and start using modern C++.
>>
>>60594554
Looks like Galaga.
>>
>mfw smooth brain
>>
>>60594609
>No traits
>No pattern matching
>No enums as tagged unions
>No good toolchain
>Slower than Rust in benchmarks
>No modules

No thanks.
I mean, they seem to be stepping in the right direction with adding std::optional and std::variant in C++17, but they're still lacking a lot of things. Maybe C++ will be good in 203X or something when they've copied most of Rusts good features like they're doing now.

They don't even have concepts in yet. LMAO.
>>
>>60594636
>he doesn't recognize Donkey Kong
>being this newfriend
>>
>>60594644
Well, it looks like you have no choice but to get used to immutability by default and the proper ways to deal with it while hating Rust for forcing you to write slightly more correct programs.
>>
>>60594693
unsafe code != incorrect code.
My code is correct because it upholds Rusts assumptions about the semantics of mutable and immutable references, therefore it's correct.
The unsafe code is just an implementation detail, it's self contained.

There's plenty of unsafe code in the standard library.
>>
>>60594636
>Galaga
galaga? for real? ( ̄ω ̄;)

it's pac man ᗧ · · ·
>>
Best XML parser for C? Preferably a single-file library,
>>
>>60594724
libxml
it's most likely already in your computer (if you use linux)
>>
>>60594651
Sorry, anon, I am more into, you know, programming and shit than videogames
>>
>>60594732
Yeah I've got it, but it just seemed like a huge thing when I took a look at the repository. I just wanted something like rapidxml (which is C++) which you can just compile as part of your project since it has such few files and link statically without thinking.
>>
>>60594499
The wikibook
Install stack
>>
>>60594766
yeah but if you target is a linux system it'll most likely be installed
>>
File: xml.png (26KB, 496x320px) Image search: [Google]
xml.png
26KB, 496x320px
>>60594724
>XML
>>
>>60594784
I'm targeting both Linux and Windows, and in any case I don't like relying on stuff being installed on the user's PC, I would rather link statically.

>>60594789
I didn't make this choice.
>>
>>60594789
>a kernel developer
>giving his opinion on text serialization formats
Why should anyone care?
>>
>>60594821
Want my opinion instead then?
XML is complete and utter trash.

Use TOML or JSON.
>>
>>60594724
>not reinventing the wheel
your brainlet genes are showing
>>
>>60594821
>>a kernel developer
not only, he also made git
>>
>>60594100
>What are you working on, /g/?
A weird mixture between text adventure and roguelike. Instead of tiles, you have connected rooms containing items, npc and (possible fragile) objects you can use to take cover.
It probably helps that there are guns.
>>
>>60594839
It's actually reason enough to disregard his opinion, t b h.
>>
>>60594196
>Nice, but it's really a trivial thing to write, there are more lisp interpreters on GitHub than lisp programmers in the world. Try writing an interpreter for a language with a syntax next time, it's more interesting.
this
but also
>>60594238
>, it's better than the retards posting fizzbuzz
>>
>>60594900
lel, sure, and you, what have you have done?
>>
can someone post the /dpt/ programming challenges/exercises plz
>>
>>60594900
this, it's not as terrible as cvs, but it's sure a guts-outside system
>>
How do we know how many entries in the array of char*?
char* t = { "/lit/", "/v/", "/g/", "/op/", "/is/", "/a/", "/faggot/" };
sz = sizeof(t); // returns 28


Just make a division on 4?
>>
>>60594945
You should maybe learn how to program first
>>
>>60594945
>char* t = { "/lit/", "/v/", "/g/", "/op/", "/is/", "/a/", "/faggot/" };
That's not a valid initialisation.
char *t[] = { /* ... */ }
would be the valid way to do that.
>>
>>60594945
wtf that's not how this works
>>
>>60594964
or char **t = { ... }
>>
what exactly is the use of stacks and queues? lists are fucking amazing
>>
>>60594945
sizeof(t) / sizeof(char *)
>>
>>60594980
No, that's wrong.
>>
>>60594984
Lists tend to be destructive to cache performace, because nothing guarantees entries are close to each other in memory.
>>
>>60594964
>>60594959

Beg my pardon, that was a typo, I slept for two hours and missing things like that.
>>
>>60594984
>what exactly is the use of stacks and queues?
undo/redo and job lists, if you need a high-level example
>>
>>60595006
but aren't stacks and queues basically lists with sets of rules to add/remove?
>>
>>60595059
Stacks and queues are abstract data types, and don't say anything about how they're actually implemented.
For example, it's extremely common for a stack to be implemented using an array.
>>
>>60595059
No, that's entirely dependeng on the implementation. Both could have a linked list used internally, but it could just as well be an array.
Anyway, they're not really comparable. At least I don't think of queues or stacks as "containers" in the same sense I would think a linked list was - you build and use them sometimes to get a specific job done (inserting or deleting in a specific order), not really to just store stuff.
>>
>>60595059
in the C++ standard library you can specify a container for the queue/list/vector/whatever
you can even use your own if you need to
>>
File: 1495716237881.png (421KB, 3840x2160px) Image search: [Google]
1495716237881.png
421KB, 3840x2160px
>>60594931
>>
>>60595094
>>60595095
>>60595128
thanks for the answers, i had no idea you could make a stack using an array
>>
>>60595210
No rolls please, use this
shuf -i 1-228 -n 3
>>
>>60595334
gl with your snake game
don't forget to post it here!
>>
>>60595334
>rolling
winfags will defend this
>>
Any OpenGL people here?

If I want to write a 2D renderer that can render thousands of sprites and is portable to older machines (so OpenGL 2.0 or something close), should I be
a) Building a software-side buffer of sprite vertices every frame, then calling glBufferSubData() to buffer it up or
b) Use glMapBufferRange() somehow?

I have used the first approach before but it seems like its a lot of redundant memcopying. Or is it?
>>
File: 1493361618266.jpg (70KB, 559x836px) Image search: [Google]
1493361618266.jpg
70KB, 559x836px
Do you guys like to write documentation for your programs?
>>
>>60595636
My code is self-documenting.
>>
File: 1480757811550.png (549KB, 1920x1080px) Image search: [Google]
1480757811550.png
549KB, 1920x1080px
>>60595210
how is it that v3.0 has more exercises than 4.0?
fix your versioning system /dpt/
>>
>>60595661
Higher version number != more features you idiot.
>>
>>60595666
look at the file names "idiot".
3.0 is later than 4.0
>>
>>60595685
...? You're using the file names as your measure of time?
>>
>>60594554
pokeymanz gho
>>
File: dpt.png (56KB, 580x265px) Image search: [Google]
dpt.png
56KB, 580x265px
Reminder to never use offensive or inappropriate language in your code, not even ironically, not even for your pet projects.
>>
>>60595619
I actually did this it but I used Rust+glium so I don't think I can be helpful that much, still tho.
I used uniform buffers to store parameter for each sprite type (offset in texture, size in texture, size on screen), and I used vertex buffer to store data for each individual sprite (position, transformation matrix, scale, ID of sprite and # of frame in the sprite), then in the geometry shader I created a quad for each sprite on screen based on this data. I think this is the most efficient way of doing it, but I'm not sure if my uniform buffers are being memcpy'd to the GPU every time, they certainly don't have to be.
>>
>>60595776
touch CoC.md
KISS tarballs


GTFO
>>
/dpt/ should i write a computer worm that checks browsing history to detect if you're one of the many kinds of people who are deficient of character in a way that offends good conservative values (e.g. niggers, faggots, jews, spics, mudslimes, trannies, sluts, landwhales, commies, etc) and if you are then it writes boot code that will wipe your hard drive and try to find flaws in your hardware design that will let it physically damage the hardware through code to as great an extent as possible?
>>
>>60594747
but anon
videogames are programming
>>
>>60595791
That's an interesting approach, though I don't know if it's going to work for older machine due to the use of a geometry shader.

What kind of an interface did your renderer have, then? The ones I've made, and the one I'm making, look something like this in pseudocode:
while (1)
{
sb_begin(&batch);
sb_sprite(&texture_a, 20, 302);
sb_sprite(&texture_b, 26, 90);
sb_sprite(&texture_b, 40, 35);
sb_end();
}


Each sb_sprite() call would write four vertices to a buffer on the software side. Then when sb_end() would be called, this buffer would be sent to the GPU via a call to glBufferSubData().

But with glMapBuffer you could directly write the sprite vertices to the buffer's memory, though apparently it has some drawbacks and I'm not sure how reliable it is on older drivers. So I'm wondering, which one's faster.
>>
>>60595791
>>60595886
Oh, and I don't think uniform buffer objects work in something like GL2.0 either.
>>
>>60595859
>>>/pol/
>>
A programmer want to impress a girl

He has heard that a particular species of trout give smooth abs

He think oh I will go to catch trout

Why he not go to catch trout??????????

BECAUSE!!!:


a fish in sea is more important than abs traction
>>
Level of comfyness : meh
This shit simplifies fractions from a dat file :
0000000004 0000000008
0000001536 0000078360
0000051478 0000005536
0000046410 0000119340
0000007673 0000004729
0000004096 0000001024


IDENTIFICATION DIVISION.
PROGRAM-ID. FRAC-SIMP.

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT FRAC-FILE ASSIGN TO "FRACTIONS.DAT"
ORGANIZATION IS LINE SEQUENTIAL.

DATA DIVISION.
FILE SECTION.
FD FRAC-FILE.
01 FD-FRAC.
88 END-OF-FRACS VALUE IS HIGH-VALUES.
02 FD-NUM PIC 9(10).
02 FD-DEN PIC 9(10).

WORKING-STORAGE SECTION.
01 WS-GCD PIC 9(10).
01 NUM-RED PIC 9(10).
01 DEN-RED PIC 9(10).

PROCEDURE DIVISION.
BEGIN.
OPEN INPUT FRAC-FILE
READ FRAC-FILE
AT END SET END-OF-FRACS TO TRUE
END-READ

PERFORM UNTIL END-OF-FRACS
CALL "GCD"
USING BY CONTENT FD-NUM, FD-DEN
RETURNING WS-GCD
END-CALL

DIVIDE FD-NUM BY WS-GCD GIVING NUM-RED
DIVIDE FD-DEN BY WS-GCD GIVING DEN-RED
DISPLAY NUM-RED SPACE DEN-RED

READ FRAC-FILE
AT END SET END-OF-FRACS TO TRUE
END-READ
END-PERFORM
CLOSE FRAC-FILE

STOP RUN.

IDENTIFICATION DIVISION.
PROGRAM-ID. GCD.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 TMP PIC 9(10).

LINKAGE SECTION.
01 NUM PIC 9(10).
01 DEN PIC 9(10).

PROCEDURE DIVISION USING NUM, DEN.
BEGIN.
IF NUM < DEN THEN
MOVE DEN TO TMP
MOVE NUM TO DEN
MOVE TMP TO DEN
END-IF

PERFORM UNTIL DEN = ZERO
MOVE NUM TO TMP
MOVE DEN TO NUM
DIVIDE TMP BY DEN GIVING TMP REMAINDER DEN
END-PERFORM

EXIT PROGRAM GIVING NUM.

END PROGRAM GCD.


rate it /g/ee
>>
>>60595985
leave
>>
>>60595996
COBOL?
>>
>>60595985
>A programmer want to impress a girl

he can't, because all programmers are pathetic beta males.
>>
>>60596053
yes,
this is the output :
0000000001 0000000002
0000000064 0000003265
0000025739 0000002768
0000000007 0000000018
0000007673 0000004729
0000000004 0000000001
>>
>>60596058
wrog ansor
he cnat but not becsause of that
IT BECOZE

a fish in sea

is more improtent than abs tractn
>>
struct S {
// ...
}

void random(S* s) {
srand(time(NULL));
// ...
s->a = rand();
s->b = rand();
// ...
}

int main() {
S* s = new S[5];

for (unsigned i = 0; i < 5; i++) {
random(&(s[i]));
}


Why doesn't it produce five different values but instead replicates one five times?
>>
>>60596127
srand
>>
>>60595776
kek
>>
>>60596127
you only call srand one time in main and that's it
>>
File: photo.jpg (24KB, 274x274px) Image search: [Google]
photo.jpg
24KB, 274x274px
WOOHOO!!!! Guess who's getting a job at Northrup Grumman? $70,000/yr. Programmable logic, microcontroller, embedded systems type shit.
>>
>>60595661
>122 Design a Game Engine in Unity
classic

Still the best of all those retarded lists.
>>
>>60596127
>not reading from /dev/urandom
You deserve unhappiness.
>>
File: 1475937714938.gif (3MB, 413x233px) Image search: [Google]
1475937714938.gif
3MB, 413x233px
>just wrote about 1000~ lines of code without compiling
>>
https://stackoverflow.com/questions/15188049/rand-and-srand-in-c#15188493

here prety much have a reason why it don't work you should move srand from function to main and it should be fine
>>
>>60595934
Fuck you leftist trash, your kind would be the first to be affected.
>inb4 u cant worm me im dont use window
Wrong, you use Windows. Proof: you're a leftist, therefore you use Windows, QED
>>
>>60595859
yes please setup a git depot and I'll help you anon
>>
File: fFFKSSxt_H4.jpg (142KB, 1280x947px) Image search: [Google]
fFFKSSxt_H4.jpg
142KB, 1280x947px
>>60596314
>>60596163
>>60596141

Thank you, it worked.
>>
File: DeepinScreenshot20170526180035.png (281KB, 1680x1050px) Image search: [Google]
DeepinScreenshot20170526180035.png
281KB, 1680x1050px
>>60596324
>>>/pol/
>>>/pol/
>>>/pol/
I'm just pointing you in the right direction buddy.
>>
I never used python and now I have to look through some source.

 data =sm.imread(fname)
...
R = data[:, :, 0]



The text after the code says that R is also a matrix. So what does the [:, :, 0] index of data mean? R is a 2x2 array with elements being the 0 indexed element of whatever is the collection?
>>
File: 1474229750827.png (324KB, 498x497px) Image search: [Google]
1474229750827.png
324KB, 498x497px
>>60596393
fuck off leftist trash
not him btw
>>
File: 22.jpg (104KB, 1280x853px) Image search: [Google]
22.jpg
104KB, 1280x853px
>>60596324
queer studies cuck here reporting.

Currently Coding to Fight Patriarchy on my brand new MacBook Air, drinking a Vegan Latte. What about you anion?
>>
Why is C++ so fucking ugly? Like God damn it's a hideous language.
>>
are there any good libraries to write compilers in either Common Lisp or Scheme/Racket?

The language I want to compile or translate is not a lisp.
>>
>>60596355
>>60596437
kek did i get ya friendo?
I'm the person who posted the idea to begin with. It was satire, I'm a liberal
>>
>>60596490
Just write read macros. No need for a library.
>>
>>60596508
kill yourself then
>>
>>60596422
Yeah because everyone knows by heart what sm.imread is right dummass?
Tell you what, : standalone in python yields a value, and foo,bar,baz also yields a value. Looks like it'd being passed to the [] operator. Now look thru the docs of your sm module, and use Python's REPL, it's one of the best around. Peace.
>>
>>60596526
Haha, kill your own damn self you racist tard :^)
>>
>>60595886
I basically used this one method: https://tomaka.github.io/glium/glium/trait.Surface.html#tymethod.draw with a uniform!() macro.
I know it's not helpful, but why do you limit yourself with 2.0? Even most phones now support some kind of 3.2 IIRC.
>>
>>60596524
I just don't want to reinvent the wheel and write my LALR parser. I just want to get it done.
I just want to avoid using flex+byacc/bison
>>
>>60594580
Have you tried Dlang?
>>
>>60596422
Umm, it looks like it's an overloaded operator [] that is being passed a tuple of two slice objects and one integer as an argument.
>>
>>60594554
Pacman
>>
>>60596606
Thanks, I'll still check the link out.

The reason I'm targeting 2.0 is that I'm writing a 2D game and I want it to run everywhere, even the lowest of hardware, because there's no reason for it not to. I've been frustrated in the past when for example I would try my OpenGL 3.3 programs on my parents' PC which didn't run them properly.
>>
>>60596680
Why don't you use SDL?
>>
File: ferris tea.png (502KB, 486x481px) Image search: [Google]
ferris tea.png
502KB, 486x481px
trap.cpp:8:32: error: invalid conversion from ‘void*’ to ‘Girl*’
struct Girl *trap = crossdress(sizeof(struct Boy));
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~

Why doesn't C++ allow implicit casting from void *?
>>
>>60596631
No I'm not into necrophilia.
>>
>>60596437
No pasarán!
>>
>>60596620
Well, read macros are pretty easy to set up, but might be a bit bare bones for your tastes. Example: https://gist.github.com/chaitanyagupta/9324402
You could look through these: http://quickdocs.org/search?q=parser
>>
>>60596631
>Dlang doesn't care about safety
Thank god it's dead.
>>60596620
Writing a compiler in a language without proper type system and ADT is an unnecessarily complex task. Haskell and OCaml may be useless for everything else, but they're practically perfect for writing compilers, mostly because ADT is the best way to represent AST.
>>
>Emscripten supports opengl es 2.0 only
fug, I wanted to try compiling my thing to wasm

>>60596697
>no shaders
>>
>>60596739
Can't you use openGL function on a SDL context? I don't know how shaders work tho
>>
>>60596756
Ye, that's the approach I use: opengl for graphics + sdl for everything else (input, window creation etc)
>>
>>60596731
>Dlang doesn't care about safety
you are a moron
>>
>>60594336
Anyone?
>>
>>60596796
You mean like imagemagick?
>>
Anyone familiar with Qt here?
Any reason why creating QQuickWindow suddenly overrides vsync settings and always enforces vsync?
>>
>>60596817
because Qt is a giant monolithic overengineered piece of shit that swallows up your project because it's impossible to compile without using THEIR toolchain and build system.
>>
File: 0da803cec3c286a755f615133e6ce1f9.png (671KB, 900x1600px) Image search: [Google]
0da803cec3c286a755f615133e6ce1f9.png
671KB, 900x1600px
Any tips to make a head recursive function into a tail recursive one? That's my biggest wall in my attempt to learn Scala. I am about to start The Little Schemer to train my recursive powers but if you have any tips it would be nice.
>>
>>60596714
cheers I'll look them up.
>>
>>60596807
Maybe
Forgot about it, thanks
>>
>>60596856
tail recursion is just malformed iteration
a smart compiler will catch this and rewrite it to iteration anyway, dumb compilers will not and it leads to overflowing the stack

recursion literally kills people
>>
>>60596853
I dunno it was pretty simple to add to an existing project and everything works as expected aside from this one issue where the moment the OpenGL context gets intercepted and QQuickWindow is created it enforces vsync.

I found a related issue but it's from 2013, and last updated in 2016, I wonder if that's the exact same issue I'm having and if anyone familiar with Qt has any ideas for a workaround.

Although I'm willing to drop Qt if there are any decent alternatives to QML but I'm not aware of any.
>>
>>60595619
A couple thousand sprites (i.e ~10k verts) is nothing to even 15 year old cards, so whichever method you use (hell, even immediate mode glVertex) will work.
>>
>>60596877
You can implement any recursive algorithm iteratively by turning it into a depth first traversal of an algorithm state tree. A good lisp-like language implementation would do this for you at compile time.
>>
>>60596817
Have you tried looking into QQuickWindow source code? Maybe you'll find answers there
>>
I want to design a grammar for the purpose of writing recipes.
I haven't checked if it's necessarily LALR1, but I think it could be fun
There are things about it right now that probably don't make sense

tempurature:state = frozen | cold | room-temperature | warm | melted;
ingredient chocolate {
cocoa:state = white | milk | semisweet | dark | bittersweet;
states = {temperature, cocoa};
}

Melt : Item:ingredient >> Item.states.temperature = Melt;
Melt : List:ingredient[] >> for Item in List: Melt(Item);

recipe Melted_Chocolate {
ingredients:
s : chocolate (8:oz, semisweet);
d : chocolate (8:oz, dark);
c = [s,d]; c.name = "chocolate";
procedure:
Melt c (double_boiler:equiptment, 10:minutes);
}

Melted_Chocolate.print;

=== result: ===
Melted Chocolate
Ingredients:
8 oz semisweet chocolate
8 oz dark chocolate
Procedure:
Melt chocolate using a double boiler for 10 minutes.
>>
>>60594255
Prove it.
>>
What is something I could do to help expand my knowledge on programming? Like I want to build something but I never know how to build it. I am currently using Python and I just don't know how to build anything, I can use the language, but only syntactically. I can not use Python in the literal sense that I don't know how to use the language to build an application that is useful. Please help and give me tips on ideas and how to actually come to an understanding of how to build something.
>>
Is netbeans a viable alternative to visual studio for C/C++ development on Windows? I already use it for Java and VS is big and I'd rather not.
>>
>/g/ loves Qt
>/g/ hates C++
how can this be reconciled?
>>
>>60596973
No, but I just fixed the issue. Apparently the setFormat() function for OGL context ignores the new the set format altogether when inheriting an external OGL context however, as a result, it also enforces swap interval of 1 (it ignores the supplied format and forces its own even though it's supposed to just wrap an existing one).

So I had to do it in the following order:
* Create the window and such using the other framework
* Intercept the context/window handle
* Create QML Engine and such using the handles
* Call back to the original framework to reset swap interval
>>
>>60597231
It's either Qt or Electron. And since /dpt/ can't into css because ">webdev", Qt it is.
>>
>systems language
>Doesn't provide standard ways to manipulate the underlying system
This needs to stop
>>
when was the last time /dpt/ downloaded a desktop application that wasnt a video game or a programing tool?
>>
>>60597463
>application
>>>/g/wdg
>>
>>60597216
It's okay-ish, I think. My bud has been using Eclipse CDT since forever and prefers it over NetBeans though.

Still
>VS is big
You can select individual components in the ce 2017 installer, I doubt it's bigger than 2gbs or something for C/C++ workload only, just strip down everything you don't need
>>
File: 1495420439119.png (381KB, 632x800px) Image search: [Google]
1495420439119.png
381KB, 632x800px
>>60597488
> >>>/
>>>/trash/
>>
Okay so I have an array of pointers, X, and a stack of pointers S. They both have some pointers that point to the same value, but stack S may have pointers that do not appear in array X. Now I need to free all of these pointers, how can I do it so that I don't double free memory? I also don't want to make a list of already freed pointers.
>>
is it bad practice calloc() and free() over and over instead of memsetting to '\0'?

its from a socket so its not like it has to be super fast
>>
>>60597463
I downloaded MuseScore in 2010 or so.
>>
File: anal beads.png (77KB, 335x151px) Image search: [Google]
anal beads.png
77KB, 335x151px
>>60597463
recently
all the time

why?
>>
>>60597584
Pre-2.0 was awful. It's a lot better nowadays.
>>
>>60597439
This. I get that those languages should run on systems without screen/mouse/keyboard, but the standard library should have modules for that which have to be implemented for the systems that have such devices.
>>
>>60597575
calloc to zero-initialize it the first time and free when you don't need it anymore are fine

doing them in between just to zero it out, though, that is indeed bad practice. the memset is better because you don't need syscalls
>>
>>60597463
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3888.pdf
>>
>>60597609
Yeah it certainly is easier to write in. They should add the option to playback in different temperaments though.
>>
Why the fuck would you get into the oop meme? Just copy/paste the code, it doesn't save you a lot of time.
>a good programmer writes code only once
This doesn't matter, just copy/paste that shit. OOP is a meme, unless proven otherwise.
>>
>>60597690
???
>>
speaking about memes elixir yes or no
>>
>>60597690

Why the fuck would you get into the structured programming meme? Just copy/paste the code, it doesn't save you a lot of time.
>a good programmer writes code only once
This doesn't matter, just copy/paste that shit. structured programming is a meme, unless proven otherwise.
>>
>>60597690
what happens when you find a bug in your code tho
>>
>>60596697
I do use SDL for window creation, but SDL's "renderer" is only really suitable for debugging purposes, otherwise its not quite performant nor feature-rich enough.
>>
>>60597509
> > >>>/
> >>>/trash/
What did he mean by this?
>>
>>60597739
Ctrl+f
For 90% of people the code will never be so big to make it worth your while.
>>
>>60596961
Sure it will work and if I was happy with that I would just use the implementations I've used in the past. But at the same time, I want to learn if one way is more efficient than another, just because. Also, there's going to be other game logic like pathfinding likely running on the same thread, so its completely possible performance will be an issue at some point.
>>
File: colors.png (6KB, 432x204px) Image search: [Google]
colors.png
6KB, 432x204px
What colors should i use for my highlights?
>>
>>60597575
If it's the same size every time then of course it's bad, even disregarding performance issues it's less reliable (calloc can fail) and requires more code.
memset is clearly the better choice.
>>
>>60597785
does it do multi line comments? cool stuff btw
>>
>>60597785
man i wish i knew how to hello world
>>
>>60597575
Yes,
>>
>>60597785
Black normal text, keywords and strings (i.e no colors).
Comments whatever really, just something other than black.
Beige/grayish background.
>>
is it possible to jump to a label inside of function A from function B?

in C
>>
>>60597973
Yes, this is the reason "goto is bad" meme got popular.
>>
>>60597973
No.
>>
Learning how to use ImGui.

I'd post pretty screenshots, but I'm still at so early stages I don't have anything worthy yet.
>>
>>60597991
>this is the reason that goto is objectively bad
fix'd
>>
>>60597991
but i need it if an error occurs a few function calls deep

need the panic button to make me back to first function in the error label :(
>>
>>60598021

Use C++ and exceptions instead :)
>>
>>60597973
No, labels are local. Cross-function goto functionality exists, but you don't use the goto keyword to access it; you have to use setjmp and longjmp.
>>
>>60598020
Most other languages have more restrictions do they are ok to use.
>>
>>60598021
https://github.com/guillermocalvo/exceptions4c
>>
File: what a great day for penis.jpg (18KB, 200x238px) Image search: [Google]
what a great day for penis.jpg
18KB, 200x238px
What are the actual practical uses of setjmp/longjmp?

Is it like reverting to a save state?
>>
File: vomit.png (88KB, 389x213px) Image search: [Google]
vomit.png
88KB, 389x213px
>>60598048

>macro library
>>
File: smug_ran2.png (495KB, 1000x1000px) Image search: [Google]
smug_ran2.png
495KB, 1000x1000px
>>60598020
>shoots self in foot
>"ban guns now! guns are bad!!"
t. you
>>
>>60598062
ikr? But looks cool in autistic kinda way
>>
>>60598078
>competing gun has the ability to not fire if the gun is pointed at your foot
Yeah, I know which one I would take.

Your analogy is shit.
>>
>>60598091

Sometimes you need to shoot yourself in the foot, though.
>>
File: smug_ran1.jpg (180KB, 1732x1593px) Image search: [Google]
smug_ran1.jpg
180KB, 1732x1593px
>>60598091
>so stupid that he needs the gun manufacturer to hold his hand
>>
>>60598109

Why does Ran wear a diaper on her head?
>>
File: yukari_mad.png (34KB, 111x189px) Image search: [Google]
yukari_mad.png
34KB, 111x189px
>>60598113
Sh-shut up!
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); she's super duper cute and easy to prototype in; she has contempt for false flags; and she's a blast to write in! Did I mention how cute she is? Say something nice about her, /dpt/!
>>
>>60598200

>she's going to have her GC tumor removed (eventually)
literally when
>>
>>60598200
>GC tumor removed
Say it with me: never gonna happen.
>>
>>60598216
not with that attitude
>>
File: andrei.gif (2MB, 304x256px) Image search: [Google]
andrei.gif
2MB, 304x256px
>>60598200
>shit-tier mascot
DLang team should adopt Andrei as their official mascot.
>>
>run valgrind
>memcheck-amd64-linux crashed with SIGSEGV

nice language /C/ucks
>>
>>60598200
cute
#!/usr/bin/env rdmd
import std.stdio;
void main()
{
writeln("Hello, world with automated script running!");
}
% ./myprog.d
Hello, world with automated script running!
% _
>>
>>60597463
what about Dropbox, Spotify and all that normie shit?
what about any office suit?
what about any *nix "app" that uses CLI instead?
>>
File: dlang_chan_9.jpg (85KB, 468x424px) Image search: [Google]
dlang_chan_9.jpg
85KB, 468x424px
>>60598210
There's a reason I explicitly said "eventually".

>>60598216
I think her parents will. With that said, her parents thought that the GC tumor was cute and didn't get an operation. Thus she grew around living with it. Read these posts though: https://dlang.org/blog/2017/03/20/dont-fear-the-reaper/ and https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/

>Then there’s Phobos, D’s standard library. Once upon a time, much of Phobos was implemented with little concern for GC allocations, making it difficult to use in situations where they were undesirable. However, a massive effort was initiatedto make it more conservative in its GC usage. Some functions were made to work with lazy ranges, others were rewritten to take buffers supplied by the caller, and some were reimplemented to avoid unnecessary allocations internally. The result is a standard library more amenable to GC-free code (though there are still probably some corners of the library that have not yet been renovated — PRs welcome).

From its official documentation:
>There is currently work in progress to make the runtime library free of GC heap allocations, to allow its use in scenarios where the use of GC infrastructure is not possible.

To be clear: there's nothing wrong with having a GC. It's just that they advertise her being a systems girl; as such there are expectations for this. Honestly, the @gc is a fine substitute it seems when you need to guarantee the GC won't run. But again, having it completely optional would be idea.

>>60598310
Sugoi!
>>
>>60598365
Andrei, is that you my man? Just be honest, there is nothing wrong with ~50 y.o. man hanging around with a bunch of anime outcasts hoping to promote his language. I am sorry that Digital Mars is not Mozilla nor Google
>>
>>60598056
The state of the callstack is reverted, and with it the state of the program counter, but all changes to state inside individual stack frames or on the heap is preserved (e.g. variable values)

The most common use case is to implement a recovery strategy for the god-awful "do the thing first, check if it was a good idea later" coding style
>>
File: 1494554405972.png (1MB, 1200x1200px) Image search: [Google]
1494554405972.png
1MB, 1200x1200px
>>60598200
>>
File: 1492701837878.png (180KB, 900x927px) Image search: [Google]
1492701837878.png
180KB, 900x927px
>>60598407
Sorry to disappoint, anon. I'm just you're run-of-the-mill /a/sper/g/er with nothing to her name. My biggest contribution will be necking myself.

>>60598453
One should be using both. Most of my software these days is either in C or D. With that said, DFC > oppai piggus.
>>
>>60597463
Adobe Reader
>>
>>60598486
>My biggest contribution will be necking myself.
you should hurry up
>>
>>60598502
Not until most of you work with dlang-chan!
>>
>>60598523
nobody cares, you're nothing but a minor annoyance
i don't even remember that D exists until you show up
>>
>>60598538
Be nice anon. Why are you so angsty.
>>
>>60598523
You, like, 10 years too late.
>>
>>60598551
stop replying to my posts
>>
>>60598399
I only write in Lisp.
>>
>>60598559
make me
>>
>>60598538
>nobody cares
Yet you keep replying. There must be some love there.
>i don't even remember that D exists until you show up
That's an improvement I'd say.

>>60598552
It's never too late to bathe anons in the glory of dlang-chan!

>>60598564
As a fan of Lain, that's perfectly acceptable.
>>
>>60598523

Sounds like you have a full life ahead of you, since most of us are not going to switch to fucking D.
>>
>>60598578
You can't even justify your behavior.
Why do you want anyone to use D?
It doesn't do anything new or unique.
You're promoting a language that has probably 20 users worldwide, stop it.
>>
>>60598578
What advantages does D have over C++ and C#?
>>
>>60598613
blub paradox
>>
>>60598613
Well it's better than sepples.
Also Remedy(the game company that made alan wake and max payne) uses D and there's some other company that made games with D.
>>
>>60597463
A few minutes ago.
>>
>>60597463
inscape like 2 hours ago
>>
How important is it for me to learn asymptotic running times? I am currently reading an algorithm book, and it explains the asymptotic time. I understand most of it, but some of it flies over my head. If it is important, then what kind of math is required to be able to understand/derive said asymptotic times? I would appreciate a link from a good professor/book who explains it in the best way as well. Thanks in advance.
>>
>>60598680
That same argument was used for Lisp. Naughty Dog used GOAL so everyone should learn Lisp!
>>
>>60598680
>Well it's better than sepples.
Not much of an accomplishment.
>>
>>60598711
Learn it so you can analyze your algorithms. Look up the book by Skiena.
>>
>>60598728
>Skiena
Is this the name of the book "The Algorithm Design Manual" ? If so, thanks a lot anon, I will start reading alongside the one I am currently reading.
>>
>>60598769
Yes.
>>
>>60598588
Sounds like ignorance to me, but that's okay: it's what I'm here for.

>>60598613
I can justify it: I enjoy working with her, and she's a good language for developing desktop applications.

>>60598629
Metaprogramming is better, and she has a lot more features to her name. What's more: she doesn't have decades of bloat that's accumulated from initially being C with classes. Plus, dlang-chan can interface with C and C++ quite nicely. She can also do functional programming relatively easily! And this applies specifically to C#: it's not locked to .NET.

I encourage you all to read
Programming in D
and her online documentation.
>>
>>60598711
Unless you plan on working with gigantic datasets, asymptotic analysis isn't really relevant beyond the basics because practical or problem-specific limitations generally set in way before you approach any kind of asymptote.
And in those cases it's the actual constant factors which matter.
>>
>>60598789
>her
>she
>>
>>60598720
D can call c++ without having to first extern "C" the sepples stuff.
So unlike other sepples killers D actually let's you easily use stuff made in sepples which is must because there's just so much stuff made in sepples.

I don't think any other sepples killer let's you interface with sepples libraries directly, I might be wrong here.
>>
>>60598789
Explain why I should use D when I can just use C directly?
>>
>>60598806
>sepples killer
>with GC
Wew, lad.
>>
>>60598797
I see, that makes sense. However, I feel like I would be a "code monkey" if I at least don't try to understand this concept when dealing with algorithms. Thanks anyways anon.
>>
>>60598806
I meant that C++ is garbage.
It should be a given that pretty much any language is better than c++.
>>
>write program in high level language
>takes a couple of hours
>decide to rewrite it in C
>write it in 4 hours, spend another four debugging segmentation faults & other shenanigans
What did Dennis Ritchie mean by this?
>>
>>60598857
gb2 your pajeet languages, brainlet
>>
Is it possible in C++ to have a function inside a template argument that does something like this?
template<int a = function(input)>
class{..};

Class<10> class;


Let's say the what function does it to double whatever comes in, in order to have Class<10> actually be Class<20>, is it possible? Can i obtain this in some way?
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>60598857
Are you seriously trying to blame your own retardedness on the language?
>>60598871
This.
>>
>>60598845
Don't get me wrong though, you should definitetly know the difference between a quadratic algorithm and a linear one, and be able to recognise them in code, but you don't really need to know the math behind it (unless you're generally interested in it of course)
>>
>>60598877
No, it's not possible, and you're completely confused.
>Class<10> actually be Class<20>
Why would you ever want for a variable to have a different class from the one it's declared as?
>>
>>60598877

Template instantiation occurs at compile time.
>>
>>60598820
What other category do these kind of fast languages without any other redeeming quality fit in?

>>60598847
Problem is that you don't really have program in C because your language propably has bindings to all the important libraries(sdl, opengl, curl, ...).
There's lot of C++ code that can't be easily used without C++. I know python can kind of call c++ but python is generally really slow.
There really isn't fast statically typed language that you could use when you want to use c++ libraries and don't need really need the full speed of optimized c++. D is the only language that fits here as far as I know.
>>
>>60598803
She's cute!

>>60598814
She's much easier and quicker to write in; her standard library is really nice. The performance difference isn't noticeable for most use cases, and you can mark spots in your source where you don't want the GC run for when you need all the performance you can get. And, again, functional programming support is handy. Unlike Java and C#, D doesn't compile down to bytecode; it is a systems language after all!
I write primarily in C and D. I still use C because I have a hard-on for being somewhat close to the metal.
>>
/dpt/, is there any high level compiled language that lets you do a goto using a variable instead of a label?

I want to write a fast program that runs in unprotected memory and nondeterministically (but usefully) modifies that memory at runtime and makes jumps within it
>>
>>60597040
Anon, I'm interested. Why are you making this for?
>>
>>60598952

>goto using a variable
wat?
>>
rate my haskell http server, dpt!

https://pastebin.com/Akifyfcn
>>
>>60598935
>There really isn't fast statically typed language that you could use when you want to use c++ libraries and don't need really need the full speed of optimized c++. D is the only language that fits here as far as I know.
Yes! You also don't get stage 4 stomach cancer like when writing in C++.
>>
What is man supposed to use when here's just no good statically typed and compiled language?
>sml
no good implementaion
>ocaml
sml with shitty syntax, also does not support native threads
>lisp
too verbose, also static typing not standardized
>c
decent but manual memory management is annoying in prototyping phase
>sepples
cluster fuck that no sane person would touch
>d
can't decide if it wants to have gc or no
>rust
better stay away from it because it attract lot of crazy hipsters, also uglier than sepples
> any jvm/clr lang
requires huge vm
>go
Rob Pike is faggot, also no macros
>haskell
generates garbage 1GB/s
>chapel
cannot use libraries that was compiled with it...
>ast
Jesus Christ
fun{
a:t@ype
} list_length
{n:nat} .<n>.
>>
>>60598967
1 Gb/s
>>
>>60598935
> What other category do these kind of fast languages without any other redeeming quality fit in?
That's a good point, I think we should call them "wannabe sepples killers".
>>
>>60598952
Some GCC extensions in C might help.
>>
>>60598969
Perhaps it's time to stop programming
>>
>>60598923
because i need to pass a double parameter to a template which its only purpose is to be used at compile time to calculate 2 integers, and for reasons i won't waste time discussing i need to pass the double and not the two integers

>>60598930
i know, but we could use a constexpr
>>
>>60598969
You mean ats
>>
>>60598984
yes
>>
>>60598952
any language that lets you have function pointers probably works
>>
>>60598981
template<size_t n>
class SuperClass {
private:
static cosnt size_t actual_n = 2*n;
//Use actual_n everywhere
};
>>
>>60599017
but i have to pass a double to the template, or is there a way to cast safely from double to size_t and viceversa?
>>
>>60594129
did this for a class
>>
>>60598967
slow/10: https://www.techempower.com/benchmarks/
>>
>c++
>code is so fucked up that I have to write down what the fuck everything is doing

Why they allow this
C++ gives me headache
>>
>>60599086

brainlet
>>
>>60594715
(OωO')
>>
File: smug_ran.jpg (632KB, 709x1063px) Image search: [Google]
smug_ran.jpg
632KB, 709x1063px
>>60599086
Maybe Python is more your speed.
Get it? Not only it is because Python is a babby tier language but it's also slow, which you are.
>>
>>60599044
>at first `double` means Class<10> should be Class<20>
>then `double` means a 64bit floating point
I have no idea what you're talking about.
>>
>>60599100
python has fast development though
>>
>>60599100
Do not advocate the use of Python, even jokingly.
>>
>>60598952
>I want to write a fast program that runs in unprotected memory and nondeterministically (but usefully) modifies that memory at runtime and makes jumps within it
>I want to write a fast program
>program
friend that's not a program, it's an animal that lives in a computer
literally what the fuck
>>
>>60598970
I just did a stress test with 100 simultaneous connections sending 20000 requests and I'm happy to say memory did not go over 24 mb! 95% of requests completed under 10 ms! I'm very impressed!
>>
>>60599105
i am sorry when i wrote the example i used integers to make it simpler, and on top of it all i wrote double instead of some other random operation which i have to admit was pretty fucking confusing

anyway i will keep the template as integers and provide constexp to go from double to integer and fuck it
>>
>>60599100
>python

Kys

I need to work with C++
I need to understand what the fuck I did last week
Hence, I need to write down shit because C++ is a fucking mess
>>
File: smug_ran4.jpg (465KB, 565x800px) Image search: [Google]
smug_ran4.jpg
465KB, 565x800px
>>60599154
>so stupid that he doesn't know he's getting his piss taken out of
>can't understand C++
Coincidence?
>>
>>60599154
>I need to understand what the fuck I did last week

couldn't you write comments?
>>
>>60599177
>stupid
excuse you but what makes you think you know how my posture looks when i walk
>>
>>60599177
>getting his piss taken out of
that's not how you use that phrase
>>
>>60599080
Sadly, I am not using a "web framework" so this information is not useful to me. Thank you anyway!

There are many performance improvements to be made! Gradual improvements will happen and my haskell http server will become better than ever before! The next step is caching of users to avoid disk writes and reads. I believe this will double performance, if not more!
>>
>>60597040
that's interdasting
>>
>>60595619
glMapBuffer demands synchronization, using is is bad for performance these days
openGL performance in general is a closed black box, don't try and do clever shit to squeeze out more performance when something simple will suffice. as a previous poster said drawing sprites is not that taxing, and your graphics card works in parallel to your processor so making your graphics draw faster is not going to save you CPU cycles. you can batch static sprites using glBufferSubData although I'm not sure it will save you preformance on dynamic sprites
>>
>>60598789
>locked to .NET
This is objectively incorrect. C#'s tools are completely free and open source. C# can be used in other frameworks that have absolutely nothing to do with .NET.

I don't understand why you see the ability to utilize .NET Core and the .NET Framework as a negative.
>>
>>60598789
>also do functional programming relatively easily
What can D do that C# cannot do in relation to functional programming?

I'm here to learn.
>>
new thread when? :3
>>
>>60599086
Because that's what you get when you shove 34 years worth of "Ooh! and we should add THAT feature too!" into a C-based language.
>>
>>60599405
10 posts from now.
>>
I want money
>>
>>60599414
please could you then post faster
>>
>>60599458
Java, C#, C++, Python, C.
>>
>>60599462
emacs > vim
discuss
>>
>can't use log or ceil in a c++ constexpr
why boys?
>>
>>60599489
are you writing arithmetics in templates or what
>>
>>60599468
javascript php

>>60599488
emacs < spacemacs > vim
>>
>>60599489
I don't thing log or ceil can be computed at compile time unless C++ has grown to become some kind of monster.
>>
>>60599502
Those are omitted for obvious reasons, along with SQL.
>>
NEW THREAD!!

>>60599509
>>60599509
>>
>>60599501
yeah
>>60599504
well a tryhard compiler could compile log or ceil and execute them and then compile the result into the code
>>
>>60599528
>well a tryhard compiler could compile log or ceil and execute them and then compile the result into the code
It would be interesting to have a language like C except that everything is a compile time constant except anything that can't be. It could work kind of like const. You could have a qualifier for it, say ndet for example (nondeterministic), and have a rule that anything computed from at least one value of an ndet type must also be of an ndet type.
Thread posts: 313
Thread images: 37


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.