[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: 340
Thread images: 45

File: dpt.jpg (154KB, 1024x768px) Image search: [Google]
dpt.jpg
154KB, 1024x768px
What are you working on, /g/?

Previous thread: >>60154925
>>
thank you for posting a 3D image
>>
Is the storm over?
>>
File: 1466544326223.jpg (32KB, 557x612px) Image search: [Google]
1466544326223.jpg
32KB, 557x612px
>pattern matching as a language feature
>>
4th for 3d
https://www.youtube.com/watch?v=gTBCHu0btn8
>>
>>60162346
creating a bot that listens on /g/ for mentions of Java, which then creates a bounty on Fiverr to accomplish a task using foreach on iterators.
>>
>>60162346

Program that can read PDFs, pull serial numbers for computer parts, check warranties on them, and then make a sales ticket to renew the warranty a week before its due
>>
>>60162346
Does /g/ have a favorite pair of programming panties?
What color are they?
>>
how do i write deep learning ai from scratch
>>
>>60162415
Commando master race.
>>
File: SCR_1493662921.png (28KB, 238x61px) Image search: [Google]
SCR_1493662921.png
28KB, 238x61px
Is there a simple way to have an offline copy of websites like cppreference.com and cplusplus.com?

I want to keep those with me for dark times.
>>
File: dilly.jpg (236KB, 940x940px) Image search: [Google]
dilly.jpg
236KB, 940x940px
>>60162415
not panties, but I do have an 'programming thoughtwave attenuator' that I use to focus my thoughts in a central locii about my upper-most chakra

pic related
>>
>>60162450
yes, use BeautifulSoup with Python. or Scrapy.
>>
should i finish reading K&R all the way through before going through X86 assembly language and C fundamentals, or can i go through them alongside one another?
>>
>tfw no monochrome CRT monitor to program with

y live
>>
Riddle me this /dpt/
Why do all /g/ projects fail eventually?
>>
Has anyone got any experience with this book?
Need to read it for school. But it fucking sucks.
>>
>>60162468
systemic and intrinsic autism
>>
>>60162480
linux device drivers are thrilling wtf are you talking about anon. read the book
>>
File: 1493088914602.jpg (6KB, 284x177px) Image search: [Google]
1493088914602.jpg
6KB, 284x177px
Should I know Ada?

I'm about to get my MSc in compsci. All of my friends who quit after the BSc have jobs where Ada plays a big part. I've focused mostly on C++ and C, although my university basically only teaches Java.

How important is Ada in the industry?
>>
>>60162463
Just program something to emulate this through software, kill 2 birds with 1 stone
>>
>>60162485
I am talking about the book sucking not linux drivers.
>>
>>60162450
You could just get the raw HTML with one line in any high level language.

new WebClient().DownloadFile("https://boards.4chan.org/g/thread/60162346#p60162346", @"C:\temp\fuckingdpt.html");
>>
>>60162468
bad logos
>>
>>60162456
>>60162502
... that's not a simple way.

I was hoping somebody already made a scraper or just a dump of website's contents.
And, indeed, there's an HTML book archive of cppreference.com
Works for me.
>>
>>60162531
Well, then you should have clarified what you were looking for.

You said "websites like" and specified an offline copy of the website itself.
>>
>>60162531
then go out and google for one ya pooaloo . why even ask?
>>
>>60162415
I still live at home so I don't dare to order some programing panties and socks, but I think I would like some shimapan.
>>
File: genius.png (198KB, 358x387px) Image search: [Google]
genius.png
198KB, 358x387px
>>60162560
>>60162562

I should have asked "what's the best way to get offline C++ documentation".
But it's 1:30 AM, so I didn't.
>>
>>60162450
>>60162531
Literally first result of google you brainlet
>>
>>60162430
use a existing deep learning ai and let it build a deep learning ai.
>>
First year comp sci student here, struggling with abstract data types.

Currently struggling with link lists in java would appreciate if someone was to help me out.

I have been given an object of List Node, as well as index of the first node in the list

with these tools how can I find out things like size of the list, or getting the index of last node in the list?
>>
>>60162594
which one?
>>
>>60162663
current ones are too stupid

i can make a better one i just need a tutorial
>>
File: 1493144439949.png (5KB, 276x270px) Image search: [Google]
1493144439949.png
5KB, 276x270px
>>60162717
>>
>>60162710
think of a linked list like a rope with knots in it. each knot is a node. when you are given a node, it is like someone put a specific knot in your hand. you also know this is the nth knot and you know you can pull on the rope to get to the next knot. given this information, how can you count the total number of knots?
>>
>>60162490
Ada isn't prevalent in most of the industry, but I would suggest you learn it because, at least for me, teaches you how to write better programs.
>>
File: tiobe.png (29KB, 766x761px) Image search: [Google]
tiobe.png
29KB, 766x761px
>he doesn't use Java
>>
File: 1362960884713.png (28KB, 499x322px) Image search: [Google]
1362960884713.png
28KB, 499x322px
>>60162790
>Visual Basic surge
>>
>>60162790
BASED
>>
>>60162790
>visual basic above js
JAVASCRIPT BTFO
HOW WILL /wdg/ EVER RECOVER?
>>
>>60162790
>scratch
what am i missing here
>>
>>60162790
VISUAL BASIC DOES IT AGAIN

WEBDEVS BTFO ON ALL FRONTS
>>
>question
ive been playing around with python on/off for atleast 2 years can do some cool stuff. just wondering at what point can i actually program? i want to start on more intermediate/advanced level projects
>not just little meme programs that make patterns in a terminal
>>
>>60162790
real talk: why is java so popular?
>>
>>60162883
It's good and has an extensive ecosystem.
>>
>>60162878
you have to reach at least level 15 on code academy to be able to make real programs. hope that helped
>>
>>60162883
It works and is portable.
>>
>>60162883
http://chrisdone.com/posts/dijkstra-haskell-java
>>
>>60162806
>>60162826
>>60162871
Am I missing something here? I was under the impression that VB was deprecated as a language.
>>
>>60162883
statically typed, well tooled, platform independent, state of the art gc, stable
>>
>>60162899
so is every other compiled language
>>
Anyone good at using cmake?
I have my project in a git repository, with the build dependencies added as submodules. How can I build the dependencies alongside my project?
I already have a file that looks like
add_subdirectory(ExternalDep1)
add_subdirectory(ExternalDep2)
add_subdirectory(MyProject)


However, when I use the makefile that this produces it doesn't include the headers for ExternalDep1 and ExternalDep2, obviously because I'd have to do make install for that. How can I make cmake install ExternalDep1 and ExternalDep2 (preferably to a temporary folder) but not my program?
>>
>>60162450
cppreference.com has a tar file http://en.cppreference.com/w/Cppreference:Archives
>>
>>60162883
Java is popular because Java is popular.
Every high school class teaches it, many people know it, companies get many cheap Java developers.
>>
>>60162384
whats wrong with that?
>>
>>60162909
No, VB.NET is not deprecated. You may be thinking of VB6.
VB is still actively developed and has near feature parity with C# -- making it basically just C# with less punctuation for the majority of use cases.
>>
>>60162969
>implementing specific language features instead of making the language more expressive in general
>>
Is there a way in Haskell to do something like this:
foo = do
return $ Foo { foo <- getValueFromMonad
, bar <- getValueFromMonad
-- etc.
}


WITHOUT doing this:
foo = do
a <- getValueFromMonad
b <- getValueFromMonad
-- ...
return $ Foo { foo = a
, bar = b
-- etc.
}

?
>>
>>60163014
Foo <$> getValueFromMonad <*> getValueFromMonad -- ...
>>
>tfw you spent hours reinventing the wheel
>>
>>60163028
I love you
>>
>>60163014
>>60163028
you can also do this with the extension
RecordWildcards

-- foo/bar are the exact names of the fields
do foo <- getValueFromMonad
bar <- getValueFromMonad
return Foo { ... }
>>
still stuck on this.
I need to disable write-protection on shadowed ROM in x86 real-mode. but I have no idea how that's done.
any ideas?
>>
>>60163044
I love you as well.

Some of these more obscure features are impossible to find with Google.
>>
>38 Haskell 0.434%
Is Haskell a meme?
>>
>>60163063
Applicative functors aren't obscure.
>>
>>60163014
maybe using template haskell but its not worth it. the problem is haskell is lazily evaluated so the foo, bar, etc are not be computed until needed. thus the order of the operations is ambiguous in the first case. the second case specifies the procedural order for the monadic operations and leaves no ambiguity
>>
>>60162790
Everyone knows that Tiobe is bullshit, right?

I mean, yes, of course Java is up there, but the fact that Javascript is behind Visual Basic is pretty telling.

There are massive amounts of false positives for C, because it erroneously picks up things for C# and C++.
>>
>>60163063
RecordWildcards is pretty nice

you can use it in two ways

1) in an expression
FB { ... }
builds the type (where the constructor is FB) using variables in scope that have the names of the fields
e.g.

data FB = FB { fizz, foo, bar :: Something }
fun fizz =
let foo = ...
in FB { ... }
where bar = ...


and 2), the opposite, in a pattern
fun FB{...} = ...
this defines all of the fields of FB as variables in the scope of ...


the solution in >>60163028 works with arbitrary functions
>>
How do i use regex to find a specific word with any combination of capital and non capital letters?
>>
>>60163116
^[aA][nN][iI][mM][eE]$
>>
How exactly do I display the value held in the rax register? This is what the book shows but I tried running that and nothing shows (Linux ASM)

section .data

section .text

global _start
_start:
mov rax, 10
add rax, 12
add rax, rdx
>>
>>60163116
Why use regex for this? There are easier, and more performant ways in most languages.
>>
>>60163137
is that the most efficient way?
>>
>>60163145
seriously fuck people like you
>>
File: people like writing haskell.png (55KB, 800x500px) Image search: [Google]
people like writing haskell.png
55KB, 800x500px
>>60163064
>>
>>60163165
Fuck regex, and fuck you.
>>
>>60163138
you have to go step by step in some kind of debugger
for example
info registers
in gdb
>>
>>60163116
(?i)foo or just use the general ignore case flag
>>
>>60163166
>proof that haskell programmers are unemployed
>>
AS3 is best language
const PRIMES:int = 3000000;
function isPrime(n:int):Boolean
{
if(n <= 1) return false;
var sqN:int = Math.sqrt(n); // Only need to check upto the root of n
for(var i:int = 2; i <= sqN; i++) {
if(n%i==0) return false;
} return true;
} var primes:Vector.<int> = new Vector.<int>;
for(var p:int = 1; p <= PRIMES; p++) {
if(isPrime(p)) primes.push(p);
} var primeSum:Number = 0;
for(var s:int = 0; s < primes.length; s++) {
primeSum += primes[s];
} trace("Sum of the primes upto "+(PRIMES).toString() + ": "); trace(primeSum);
>>
I wrote a node.js script for testing whether or not new functions that my developers implemented in our web service behaved according to specs.

What kind of testing is this called?
>>
>>60163220
Do your own homework, Pajeet
>>
>>60163166
>not getting comfy with a bottle of wine on a Sunday writing SQL and fucking with sharepoint
>>
>>60163210
>a person can only use one language
>>
>>60163166
and assembly
>>
File: 1420866899332.jpg (24KB, 400x386px) Image search: [Google]
1420866899332.jpg
24KB, 400x386px
>>60163240
>>
>>60163243
>a person can use Haskell for their job
>>
>>60163212
>obvious opportunity to use a sieve
>doesn't use a sieve
kys
>>
>>60163210
What do you think they do during the week?
>>
>>60162346
got a shit load of baseball cards, so i'm making a program to automatically look them up and catalogue them and their price from some database

>>60162415
striped pink :3
>>
>>60163279
I can tell you what they don't do

program in Haskell
>>
>>60163247
and c
>>
>>60162921
Is there a zip file for cplusplus, though? If not, should I make one?
>>
>>60163228
What kind of homework would this even be?

The term I'm looking for seems to be functional testing, maybe even specifically smoke testing.

Have fun not having a well-paying job, my friend.
>>
File: amanwroteaprograminjavascript.jpg (357KB, 1024x679px) Image search: [Google]
amanwroteaprograminjavascript.jpg
357KB, 1024x679px
I fucking hate weak typing, makes me literally puke

who thought that it was a good idea
>>
>adult male
>not a polyglot, multi-paradigm software architect
shame
>>
>>60163427
acceptance testing
>>
File: 2017-04-23-213517_658x372_scrot.png (21KB, 658x372px) Image search: [Google]
2017-04-23-213517_658x372_scrot.png
21KB, 658x372px
I am trying to implement a bitcoin roll game in which a pair of players rolls a number and the highest wins the pot. I'm trying to figure out the implementation details now.

1) Do I have both subscribe to one websocket topic and send em a message that the game started and to send them a JSON with who's the winner or the loser after I generate random numbers for them?
2) Do I somehow connect these people to each other and have em directly send events to each other? For ex user A rolls, the even of rolling and the number of the opponent goes to B, B rolls, the server decides who won the game and sends them both a JSON of the results?
3) Do I not wait for any events and simply decide two random numbers for the participants and just show em the results after they click roll?

Another question for Elixir fags, how do I make a socket available in the application generally so the server can relay messages btw the sockets directly?
>>
>>60163495
>>>/g/wdg
>>
>>60162346
Is it worth spending my time getting into Lua?
>>
>>60163281
dont you find em a hassle to put on sometimes? maybe you'd like someone to help you with it~
>>
File: 0286498449695.gif (2MB, 366x206px) Image search: [Google]
0286498449695.gif
2MB, 366x206px
import glob
import os
from random import choice
from string import digits

extensions = ['.jpg', '.webm', '.png', '.gif', 'jpeg', '']


def random():
return ''.join(choice(digits) for i in range(13))


for meme in extensions:
rename = glob.glob('<Path>' + meme)
for thing in rename:
os.rename(thing, '<Path'+random()+'.'+meme)


Anti-Archiee stalking code, python(3) compatible
>>
>>60162346
Anyone have any good books or tutorials for Powe she'll?
>>
>>60163495
option 1 is the best for the long term - especially if you imagine several messages happening over a single game (player 1 is ready, player 2 is ready, roll result is..., player 2 says "good game")
option 2 is trash your players will just spoof the roll and send whatever they want to the other player
option 3 is fine

remember to do everything server side, people will just reverse engineer or hack the clients if they can
>>
>>60163540
owo
>>
>>60163575
what happens if you randomly choose a filename that already exists?
>>
>>60163493
Acceptance testing appears to be closer to release than the kind of testing I've done; I've just tested if our server is done so our developers can shift focus to client development. Acceptance testing requires a user story to be fulfilled. None of our user stories involve specifically being able to interact with the backend manually, but involve the user interacting with the pretty and user-friendly client.

>>60163495
Use ethereum instead. It's the easiest thing possible for this, and will dispel any idiots screaming that you rigged it.

It also confirms faster, and probably will continue to do so for some time to come.
>>
>>60163005
>every lisp that has moderate usage isnt even statically typed
enjoy your shit perf
>>
>>60163630
a-anon please, i-i'm sensitive there
>>
>>60163441
people that can't write compilers (or who dgaf).
Because js pays the bills I went full Microsoft and started using hungarian notation everywhere.
>>
>>60163538
I started with Lua just to try out Torch. Coming from C++/Java/Python I absolutely hated it, 1 based indexing, non traditional operator usage, not using {} for scopes, everything is an associated key-value array - go make your own data structures with this, even file reading was a pain. Not worth my time
>>
>>60163441
weak typing should be considered a war crime
>>
File: 6332952436988.png (93KB, 825x593px) Image search: [Google]
6332952436988.png
93KB, 825x593px
>>60163620
The odds are really small. But I guess it breaks?

I guess that should be fixed. I just wrote this up in like 10 seconds. Thanks for the point, im pretty drunk so i didnt think it all up

import glob
import os
from random import choice
from string import digits
from random import randint

extensions = ['.jpg', '.webm', '.png', '.gif', 'jpeg', '']


def random():
new_ext = extensions[randint(0, 4)]
new = ''.join(choice(digits) for i in range(13))
return new+new_ext


for meme in extensions:
rename = glob.glob('<Path>*' + meme)
for thing in rename:
os.rename(thing, '<Path>+random())
>>
>>60163740
take a look at this module from python3+
https://docs.python.org/3.0/library/tempfile.html#tempfile.mkstemp
>>
File: 9321514540214.jpg (100KB, 419x600px) Image search: [Google]
9321514540214.jpg
100KB, 419x600px
>>60163740
>>60163620
Here you go mate, i think this address the problem. Not sure if while will work for this. but I think it does?

import os
from random import choice
from string import digits
from random import randint

extensions = ['.jpg', '.webm', '.png', '.gif', 'jpeg', '']


def random():
new_ext = extensions[randint(0, 4)]
new = ''.join(choice(digits) for i in range(13))
return new+new_ext


for meme in extensions:
meme_folder = '<PATH>'
rename = glob.glob(meme_folder + '*' + meme)
for thing in rename:
new_name = meme_folder + random()
while os.path.isfile(new_name):
new_name = meme_folder + random()
else:
os.rename(thing, meme_folder + random())


I dont know if this works for like a GOTO:10. Re-check or if its just going to use the old variable in the check
>>
Is there a way to get Python do display the "u" tag before Strings? (The one indicating it's a Unicode string.)
>>
>>60163681
i can see that, quite the reaction you got in there anon chan~
>>
>>60163831
it should start with 14
>>
>>60163828
I gotta go to bed, 10pm here and i have work tomorrow. thanks for the link tho
>>
Why do some people hate unicode?
>>
File: 1442053340082.png (565KB, 675x720px) Image search: [Google]
1442053340082.png
565KB, 675x720px
>>60163855
just 4 u buddy. a lot of huge changes had to be made but i came through, now i gotta bed 44 real


import glob
import os
from random import choice
from string import digits
from random import randint

extensions = ['.jpg', '.webm', '.png', '.gif', 'jpeg', '']


def random():
new_ext = extensions[randint(0, 4)]
new = '14'+''.join(choice(digits) for i in range(11))
return new+new_ext


for meme in extensions:
meme_folder = '<PATH>'
rename = glob.glob(meme_folder + '*' + meme)
for thing in rename:
new_name = meme_folder + random()
while os.path.isfile(new_name):
new_name = meme_folder + random()
else:
os.rename(thing, meme_folder + random())
>>
>>60162346
what's a good light c ide with debugger for windows? VC is too big
>>
>>60163992
each filename corresponds to a timestamp
>>
>>60164010
Jet Brains suite is my Go-To IDE for C/C++/Python
>>
imagine i have this tree that represents the expression
 (a + a) * 2; 

    *
/ \
2 +
/ \
a a


i'm trying to determine the result type of the operation."
if a is an integer, + will be of type integer

here's my recursive function. but its not working. because to determine the type of multiplication, it
has to evaluate the childs first.

void check_result(node *tree)
{
if (tree->c1->terminal != NULL) {
printf(" - %s\n", tree->note);
}
else {
if (tree->c2) {
if (tree->c1->note && tree->c2->note) {
tree->note = get_operators_result(tree->child1->note, tree->child2->note);
}
printf("%s - %s [%s:%s %s:%s]\n",tree->type,tree->note,tree->c1->type,tree->c1->note,tree->c2->type,tree->c2->note);
check_result(tree->c2);
}
}
}

So how i'm i supposed to know the type of an operation, before knowing the childs type?

* - undefined [Add:(null) 2:int]
Add - int [a:int a:int]
Identifier(a) - int
Identifier(a) - int
integer(2) - int
>>
>>60164034
FUCK forgot code tags
void check_result(node *tree)
{
if (node is terminal) {
printf(" - %s\n", tree->note);
}
else {
if (tree->c2) {
if (tree->c1->note && tree->c2->note) {
tree->note = get_operators_result(tree->child1->note, tree->child2->note);
}
printf("%s - %s [%s:%s %s:%s]\n",tree->type,tree->note,tree->c1->type,tree->c1->note,tree->c2->type,tree->c2->note);
check_result(tree->c2);
}
}
}
>>
File: 1462605706711.jpg (209KB, 950x534px) Image search: [Google]
1462605706711.jpg
209KB, 950x534px
>>60164022
The idea is to make it impossible to Archieve-Stalk based on that timestamp. I'm aware of what the actual save name is based on. I guess you could set it to randomize the time-stamp but that's a lot more work than necessary, feel free to fix it for your autism though
>>
>>60163064
SHITKELL is worthless
>>
>>60164298

you meant shitlel
>>
Might write a little c++ library as an exercise, i think it's going to be about probabilistic data structures, what stuff you absolutely want to see in it?
Is there something like this already? I would like it more if it was actually useful to somebody.
>>
In swing (Java), I'm trying to make use of the method below to populate random numbers under each grid but every time I try to run it it does not work and the grid does not display the mines or numbers for minesweeper. What should I do?
Maybe I need to make each square a JButton for each square in order to do this?
There are more methods but I'll go over the word count if I posted them all.

public void populate(int num) {
int created = 0;
while (created < num) {
int row = (int) (Math.random() * this.rows);
int col = (int) (Math.random() * this.columns);
if (!minefield[row][col].isMined() && !(row == 0 && col == 0)) {
mineTile(row, col);
created++;
}

}
}
public String toString() {
String s = "";
for (int i = 0; i < rows; i++) {
for (int j = 0; j < columns; j++) {
s += minefield[i][j];

}
s += "\n";
}

return s;
}
public String toStringRevealed() {
String s = "";
for (int i = 0; i < rows; i++) {
for (int j = 0; j < columns; j++) {
s += minefield[i][j].toStringRevealed();
}
s += "\n";
}

return s;
}
>>
>>60162346
What's even the point of """coding""" with no pants on?
>>
File: 1486410724578.jpg (474KB, 1410x2048px) Image search: [Google]
1486410724578.jpg
474KB, 1410x2048px
>>60164430
because it's comfy
>>
>>60162415
I had a violet laced one but I ripped it apart when I wore it while squatting.
>>
>>60164430
to proclaim your """"femininity"""" and then complain about ogling but secretly enjoying it.
But in private, naked coding with socks on is the only way.
>>
>>60163045
>bump
anyone?
>>
>>60164561
maybe http://wiki.osdev.org/Real_Mode
>>
Fuck X.org and fuck C for lack of namespaces.
Fucking retarded braindead monkey loonix """developers""". Get the fuck out of my global namespace with your retarded preprocessor macros defining constants with completely generic names.
>>
>>60164631
>namespaces.
hello pajeet
>>
>>60164601
thanks but I don't see any mention of shadow rom or write-protection there.
>>
fairly experienced code monkey here, looking to learn C in depth

is K&R still relevant?
>>
>>60164034
>>60164034
BUMP
>>
>>60164699
>fairly experienced
>looking to learn C
>>
Anyone got scheme questions? I'll try to help
>>
Is RSI inevitable?
>>
File: cyanide.jpg (211KB, 1920x1080px) Image search: [Google]
cyanide.jpg
211KB, 1920x1080px
>>60164360
pls respond
>>
>>60164706
like most it was the first language I learned

however I would like to use it for serious things and that requires getting acquainted with C11 and learning proper practices

oh, who the fuck am I kidding. I'm just going to provoke some neckbeard flexing on here.
>>
>>60164733
In 5 years we'll have neural interface mice and keyboards, so no.
>>
>>60164806
>its been 5 years away for 30 years
>>
Why aren't you using bchs stack?
https://learnbchs.org/index.html
>>
>>60164845
I see the BSD inferiority complex is still as strong as ever
>>
>>60164631
This is why you need Rust
>>
>>60164884
Just overflow my shit up, senpai
>>
>>60164863
The world literally runs on BSD though.
>>
>>60162430
1)Read on theory
2)Look at Caffe code (it's the most readable out of every single one I've seen and every implementation if Convolutional layer backwards pass in the simpler libraries was fucking wrong)
3)Implement your own
4)???
5)PROFIT
>>
File: 1.png (2KB, 404x404px) Image search: [Google]
1.png
2KB, 404x404px
>>60164034
anyone knows this?

perhaps, i have to do the recursion another way?
>>
>>60164969
your question doesn't make any fucking sense
>>
>>60164969
What is the type of your operators?
>>
trying to set up my site in IIS, what would be the UNC path name of C:\inetpub\wwwroot\sitename

?
>>
>>60164928
the world runs on a combination of many things, but BSD fags are the only one who write passive-aggressive shit like this .

>puts("Hello, haters!");

truth is nobody gives a fuck. if you made something cool, then that's awesome. I personally wouldn't want to write a complex transactional web service with zero meaningful abstractions but for simple services this looks like a breeze to deploy and maintain and I might actually use it in the future.
>>
>>60164969
Get the type of the left child, then the right child, then apply your type-determinating-function and return that.
>>
What happens when you decrement an array pointer in C?
>>
File: Code.png (40KB, 1008x1396px) Image search: [Google]
Code.png
40KB, 1008x1396px
>>60164378
Ok, I'll rephrase this & ask how I can get the grid to populate & use the mouselistener to flag & step on the mines by using the post above & pic related?

public class MinesweeperFrame extends JFrame implements MouseListener {

private JFrame frame;
private static int row = 10;
private static int column = 15;
private static int mines = 20;
private final Minefield game;
JComboBox Difficulty;
private JButton square[][];

public MinesweeperFrame(Minefield game) {
super("Minesweeper");
this.game = game;
setLayout(new GridLayout(row, column));
square = new JButton[row][column];
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(true);
frame.setVisible(true);
buttons();

}

private void buttons() {
for(int i=0;i<row;i++){
for(int j=0;j<column;j++){
square[i][j] = new JButton();
square[i][j].setSize(200,200);
this.add(square[i][j]);
}

public void mouseClicked(MouseEvent e) {
if (SwingUtilities.isRightMouseButton(e)) {
//Code for flag clicking

} else { //Left click
//Code for stepping on the mine
}
}
>>
>>60164989
the types of the variables are: int, double or bool
the operators are: +,-,* and /
>>60164985
what do you mean?

to evaluate the type of an operator i need to check the childs first
    * <-- how to know this type before recurse down?
/ \
2 +
/ \
a a
>>
>>60165024
you get a memory address that is the size of the array type lower than the array pointer.
>>
>>60165023
yes, but what if you don't know yet the type of the right child, because you have to determine its childs type first?
>>
>>60165039
>what do you mean?
what do I mean? what do YOU mean
>>
>>60165039
>to evaluate the type of an operator i need to check the childs first
Do it anon. And it's children, not childs.
>>
>>60165033
Guess who wants to read that verbose bullshit homework assignment.
>>
>>60165050
Yes, that's called recursion. Read the wikipedia article atleast.
>>
File: 1492990848897.gif (888KB, 400x252px) Image search: [Google]
1492990848897.gif
888KB, 400x252px
Should I have different GitHub accounts for portfolio stuff I want to show employers and my videogame shit?
>>
>>60165054
hmm

>>60165059
>>60165076
i already wrote the recursive function.

but it's not working...
>>
>>60165084
Are your videogames creepy weeb porn? If not, I don't see why you should bother.
>>
>>60162594
you can download cppref as manpages look into it
>>
>>60165103
>Are your videogames creepy weeb porn?
Hell no

But I make *Minecraft mods* and I'm worried people might see that as childish.

Also the account name is a pseudonym rather than my name.
>>
File: 1480803147801.png (109KB, 246x248px) Image search: [Google]
1480803147801.png
109KB, 246x248px
>>60162346
I'm working on a simple multiplayer game written in Java. I need to deliver it in less than 30 hours and I barely finished the server side. I still need to start working on the client and UI. Goodbye, sleep.

I wish I wasn't a lazy asshole. I had more than 3 weeks to do it. But I had to procrastinate this shit to the limit.
>>
>>60165084
Same here, showed my github to an employer. He commented on it but that's it.

>>60165103
Another anon here. Mine are normie tier but they are still videogames.
>>
>>60165130
>He commented on it but that's it.
Positive or negative comment?
IT is full of spergs so he might have just said "Wow I like videogames too! The cake is a lie lol" or some shit.
>>
>>60165113
I would be more concerned about your name not being your real name more than a few mods. Employers won't judge you unless you link to specific projects, since many people use GitHub as a place to backup work.
>>
>>60165139
I guess positive, but the place was enterprise-tier with people way into their 40ies, so I doubt he plays videogames. Nowadays I regret hosting them on my github, but otherwise it'd be pretty empty.
>>
fn main(){
for i in 1f32..11f32 {
println!("{} -> {}", i, to_f(i));
}
}

let to_f = |x: f32| x/12f32;


error: expected item, found `let`
--> src/main.rs:7:1
|
7 | let to_f = |x: f32| x/12f32;
| ^^^

error: aborting due to previous error

error: Could not compile `test1`.


What "item" is missing?
>>
>>60165076
>>60165059

So, what would look like, the pseudo code of this function ?

something like this?

function(tree) {
if (left_child is terminal and right_child is terminal)
print left_child_type, right_child_type
else
// if it's not, i should evaluate the childs...
// how??
function(left_child)
}


>>
>>60165190
Google it
http://stackoverflow.com/questions/29201370/error-expected-item-found-let
>>
>>60165190
Rust globals aren't defined with the let keyword. Try a "const" or "static mut" instead.
>>
>>60165241
Do a typing pass, and an evaluation pass after that.
>>
>>60165241
nodeType getNodeType(node n)
{
if (n.left == null && n.right == null) // no children
return n.getType()
else return magicFunctionThatDeterminesTypeBetweenTwoTypes(getNodeType(n.left), getNodeType(n.right));
}
>>
>>60165265

after the recursive call?

pls explain
>>
>>60165190
the let expression has to exist inside the function scope
>>
>>60165260
>>60165253
>>60165289
Thanks
>>
>>60164523
is your butt that big anon?
>>
Is it me or does
(setf (print-requests *print-queue*)
(delete r (print-requests *print-queue*)))

feel wrong
(delete) is destructive, so why not
(delete (print-requests *print-queue*))

directly?
>>
The average human has 1 testicle and 1 boob.
>>
File: normal_burger.png (118KB, 901x766px) Image search: [Google]
normal_burger.png
118KB, 901x766px
>>60165479
My max squat is 455lbs my ass is fucking massive, though so is everything else.
>>
>>60164010
>>60164027

forgot to mention free
>>
>>60165640
damn, can I help you with your squats from below?
>>
>>60162945
>Java is popular because Java is popular

Pretty much. Colleges keep teaching it because "muh market share", and it has a high market share because pajeet graduates only know how to use Java.
Hopefully the vicious circle will eventually collapse under it's own weight, like the US housing market did.
>>
File: n-no_homo31.png (394KB, 734x548px) Image search: [Google]
n-no_homo31.png
394KB, 734x548px
>>60165742
Just don't suffocate.
>>
Could someone write me a SQL query? It needs lateral joins or windowing or some shit and all that goes way over my head. I just need a kick in the right direction

I need a query that will fetch all threads that meet a given criteria and the latest 3 posts from each of those threads. Here's some awful Psuedo-SQL:

select * from threads as t
where t.board_uri == X
order_by desc t.updated_at
lateral join (select * from posts as p
where p.thread_id == t.id
order_by desc p.inserted_at
limit 3)

let me know if you need more info

cheers.
>>
>tfw you want to learn to program but you're black
>>
hexadecimal's so neat. i wish we could use it in real life. in a lot of ways it makes more sense than decimal
>>
>>60165797
I got you jamal, its in your native language.
http://www.emojicode.org/
>>
>>60165774
no problem, its not my face that your is going to go up and down anyways
>>
File: 1362960884712.png (102KB, 241x228px) Image search: [Google]
1362960884712.png
102KB, 241x228px
I thought the whole Python "import" thing was a meme.

It's not.
>>
How would you write a macro for vector in C?

Like
 int[] x = Vec![1,5,3,3]
x.pop!(2); //x is now [1,3,3]
x.push!(45); //x is now [1,3,3,45]
>>
>>60166030
things dont get called memes that often for no reason.
>>
>>60166030
what meme
>>
>>60166030
import antigravity
>>
>>60166045
You know D has interop with C right?
extern (C) int strcmp(const char* string1, const char* string2);

import std.string;
int myDfunction(char[] s)
{
return strcmp(std.string.toStringz(s), "foo");
}
>>
>>60166045
There is no such way to write a macro like that in C.
What you've written there isn't even close to valid C.
>>
>>60166081
>You know D has interop with C right?
You know that basically every language has interop with C, right?
Stop trying to push non-features for your shitty deadlang.
>>
>>60166093
im just trying to save him time in whatever convoluted thing hes attempting.
>>
>>60166082
It's actually a mixture of Rust and D. But what prevents C from having a macro like that?
>>
>>60166093
Nice meme, too bad it's wrong
>>
File: 1466057769217.png (377KB, 3555x2198px) Image search: [Google]
1466057769217.png
377KB, 3555x2198px
>It's another episode of C++ fags trying to get every feature from every languages to hide their inferiority complex episode
https://twitter.com/hatcat01/status/858360761424523266

Why do they try?
>>
>>60166119
C macros are simple text replacement, and don't interact at all with the things around it.
For you "method syntax" to work, x needs to be passed as an argument to a function, but there is no way to get it from outside the macro.

>>60166122
Literally nobody but a few turbo-autists here talk about D. There is absolutely no real interest in the language.
It's the definition of dead.
>>
>>60166045
Just use varargs. How do you think printf works?
>>
>>60166154
>/dpt/ is the epitome of language life
W E W lad
>>
>>60166176
>varargs
>macro
>>
>>60166154
>Active community
>Used by plenty of organizations
>Holds DConf yearly
>hurr durr it's dead
Cyclone is an example of a dead language, D is alive and well
>>
>>60166187
So it'll be a function instead of a macro. Big fucking deal.
>>
>>60162346
Work. Scala server running on play/akka with some stuff on finagle.I enjoy this.

What I do NOT enjoy is JS degeneracy i have to make as well.
>>
>>60166206
If you create a "conference" every year for my dead memelang, and then my mum shows up out out of pity, does that qualify for my language not being dead?
>>
>>60166244
>If you
If I*
>>
>>60166244
There are more people using D ITT than you think, enjoy your 24/7 shitposting instead of writing a single line of code
>>
>>60166275
>There are more people using D ITT than you think
3?
>>
>>60166244
It helps, nice job dodging my other points though
>>
>>60166317
Count me in as well, 4. The number is already larger than the LoC you ever wrote
>>
>>60166317
oh shit
i didn't see the >ITT
>>
>>60162988

VB.NET is more like C# with worse syntax and less platform support.
>>
>>60164010
Pelles IDE
>>
>>60166151

C++ is designed by committee by people who want a language with all of the fixings. C++ is like C, with all of the good features of a number of languages, plus object orientation.
>>
>>60166451
>C++ is like C, with unbelievable amounts of useless bloat piled on top.
FTFY
>>
>>60166451
Life lesson:
Don't try to be everything
>>
>>60166451
C++, a language that does everything mediocre and nothing well.
>>
>>60166533
just like ruby
>>
File: 1484410803556.jpg (41KB, 551x720px) Image search: [Google]
1484410803556.jpg
41KB, 551x720px
write a function that prints the 500th value of 22/7
>>
>>60166548
Ruby is good at being a girl.
>>
What does it mean when Ada is completely concurrent? I'm learning Ada 2012 and don't quite understand when people say you don't need to thread in Ada as it has concurrency built in.
>>
>>60166607
That's not true. You misunderstood. Threads are a language feature, but they aren't implicit.
>>
>>60166569
what do you mean 500th value
>>
>>60166635
decimal value
>>
>>60166640
baka akari
>>
>>60166451
Except it's convoluted as fuck with a lot of very non-intuitive things, and OOP is a god awful paradigm for the reason that a lot of shitty programmers use OOP..

The only reason RAII is even necessary is because people are putting expensive resources that need cleaning up in classes to begin with. Fuck's sake.

FP meme and whatever, not everything has to be purely functional, but OOP as a design paradigm fractals out into really, really bad design.
>>
Did you know that you can implement any language feature in Lisp, and it will often be more elegant to use than in the original language? "For" example:

(for ('(x 0)) '(< x n) ('(setq x (+ x 1))) 'body)


This is far more readable than:

for (int x = 0; x < n; x++) body;
>>
>>60166783
nice meme
>>
>>60163663
Who said Lisp?
>>
>>60166690

>Except it's convoluted as fuck with a lot of very non-intuitive things
It's designed by committee. If you don't already know C++, it's going to take a lot of getting used to shit to even begin to like it. It's like using Emacs -- you're gonna hate using it for a while, and then you're going to find everything else too weak.

>OOP is a god awful paradigm for the reason that a lot of shitty programmers use OOP
There are plenty of valid criticisms of OOP, but stupid people using it isn't one of them. Stupid people also breathe oxygen, but that does not mean that it is bad to breathe. Incidentally, you will note that I included object orientation as separate from the good features inherited from other languages.

>The only reason RAII is even necessary is because people are putting expensive resources that need cleaning up in classes to begin with
Even if you aren't doing OO code, RAII is fucking amazing. It's automatic and deterministic management of resources, with complete safety around exceptions. Even if you're doing a C-style "return an error code" thing, you don't need to "goto cleanup" if you need to clean up all of your resources in an early return. Everything is added in by the compiler.

There's a reason Rust does RAII too. It's goddamn good.
>>
>>60166045
>push
>element at end
>>
>>60166827
I can see the shitstorm coming so I'll just chime in and say I agree with this.
>>
>>60166783
Why would it have those quotes when it has to be implemented as a macro anyway?
>>
>>60166827
Stupid people don't influence the types of oxygen available, or what flavor of oxygen companies force their employees to breathe.
>>
>>60166842
why are you greentexting that? there's lots of things wrong with that post, that isn't one of them. idk what lang you use but python also pops and pushes from the end of lists, which are python's stacks
>>
>>60166842

Amortized O(1) push at higher addresses
O(n) push at lower addresses

Which is better?
>>
>>60166569
shamelessly stolen and translated code

f x y 0 = (x `div` y) `mod` 10
f x y n = f (10 * (x `mod` y)) y (pred n)


(22 `f` 7) 500

>4
>>
File: 1493639209189.png (273KB, 294x442px) Image search: [Google]
1493639209189.png
273KB, 294x442px
>>60166579
>girl
>>
>>60166783
fuck off, the do and do* macros are far superior to this
(do ((x 0 (1+ x)))
((< n x) 'ass)
,@body))


not to mention the loop facility
>>
>>60166928
ruby decide for me, should i start reading "the well grounded rubyist" even though i don't have a reason in particular to learn ruby? if you don't decide i'm literally going to start punching myself so make a decision
>>
>>60166827
> It's designed by committee. If you don't already know C++, it's going to take a lot of getting used to shit to even begin to like it. It's like using Emacs -- you're gonna hate using it for a while, and then you're going to find everything else too weak.

Except vim is better. Okay, memes aside, you can't say I'll find everything else too weak when I've literally used the language, and make money from Scala, another lang which has a fuckton of features that trip out shitty developers, except there's a strong FP community around it.

> There are plenty of valid criticisms of OOP, but stupid people using it isn't one of them. Stupid people also breathe oxygen, but that does not mean that it is bad to breathe. Incidentally, you will note that I included object orientation as separate from the good features inherited from other languages.

>>60166872. this guy put it better than I did. OOP is taught and enforced in a shitty way.

> RAII

Again, I dislike the concept of shoving shit into classes for the fuck of it to begin with.

>Rust

meme lang that people talk about but no one fucking uses. Rust is a terrible example and It's dumb as shit people even bring it up.
>>
- Crate arrays with fixed size
- Use int (32) for while loops
- Use constant if you won't change the value
- Don't call a function if you don't need to
- Instead of returning value, try to mutate the function arguments
- Don't use unnecessary operations; instead of
 x += (i>j) ? 45 : 0
use if (i>j) {x+=45}

Where did you learn these rules of optimizations?

>>60166943
>mod
Dropped. Might as well import a high precession library and find the value
>>
File: 1485635075908.png (889KB, 756x715px) Image search: [Google]
1485635075908.png
889KB, 756x715px
>>60166970
>>mod
>Dropped. Might as well import a high precession library and find the value
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead, and she's super duper cute and fast! Say something nice about her, /dpt/!
>>
>>60166045
>popping specific places
>pushing to end
>in an array

The only allowed pooping and pushing is when it involes lists and their heads.
Anything else is retarded.
>>
>>60167016
rest in peace
>>
>>60166690
What do you suggest instead of RAII? It's got nothing to do with OOP - it's just automatic calling of a destructor when nothing owns the value any more.
>>
File: press F to pay respects.png (909KB, 1280x720px) Image search: [Google]
press F to pay respects.png
909KB, 1280x720px
>>60167016
>>
>>60167047
*press D to pay respects

D
>>
>>60167027
>nothing to do with oop

How does putting resource cleanup in a class's destructor have nothing to do with OOP? OOP relates to classes. Class constructors don't exist without OOP.

Maybe managing your resources, especially in a language with exceptions like every language without RAII?
>>
>>60167047
>>60167025
>Samefagging this hard
>>
>>60167061
>Class constructors don't exist without OOP.
Nonsense.
>>
>>60167067
I didn't samefag
only one of those was me
>>
File: macfag.jpg (40KB, 480x360px) Image search: [Google]
macfag.jpg
40KB, 480x360px
Last week I built a MIPS assembler and this week I'm extending it into a MIPS simulator.

I'm only supporting a subset of the ISA and I'm building it in java, fuck off its /comfy/
>>
>>60167081
Sure
>>
>>60167093
well i'm glad you understand
>>
>>60167061
A constructor is just a function that creates a value. A destructor is just a function that destroys or "destructures" a value. You don't need encapsulation, you don't need inheritance, etc. so where is the OOP coming from?

Yes, it's equivalent to call a destructor on every code path manually (and you can check it with linear types), but it's much more convenient to use affine types instead and have the destructor automatically called.
>>
>>60167067
Probably not

>>60167047
Is a middle schooler on a summer break. Probably a C tard too.

>>60167025
Is a high schooler
>>
>>60166958

>even though i don't have a reason in particular to learn ruby?
If you don't have a reason, why would you ask this question? If you want to learn Ruby, go ahead and read it. It's a pleasant language to write programs in, but it's not really a language that you HAVE to learn to work in certain industries. If you already have a language that you really enjoy working in, that does many of the same things Ruby does, don't read it.

>>60166967

Scala and C++ don't really have the same use cases, given that one is run in a VM, and the other is used to make VMs. For languages within its class (Ada, Rust, C, D, Go), C++ feels a lot more powerful.

>Again, I dislike the concept of shoving shit into classes for the fuck of it to begin with.
It's syntactic sugar. A method is just a fucking function with an invisible first argument that is a pointer to the object. Even if you don't define any methods other than the constructors and destructor, you still win in not having to write any cleanup code in your functions.

>meme lang
I mentioned it because it is one of the primary viable alternatives being offered to C++, and it may be less of a meme in 5 to 10 years.

>>60167024

push/pop are common operations on vectors, which are not the same as static sized arrays. They are arrays that are allowed to grow in size. They have O(1) amortized push/pop and O(1) random access. The only thing that sucks is insert at front or middle, which is O(n) every time. Still better than linked lists for most use cases.
>>
>>60167115
You D(ead)fags sure do project hard.
>>
>>60167088
So it's MARS?
>>
>>60167129
Says the toddler who refuses to accept he's wrong
>>
>>60167129
What school do you go to?
>>
>>60166970
bump
>>
File: 1489044308498.jpg (30KB, 546x640px) Image search: [Google]
1489044308498.jpg
30KB, 546x640px
>>60167135

Yup. I'ts for a a comp architecture class and yeah its homework. Its actually a pretty cool exercise, although its pretty easy. Basically just a parsing program that does 2 passes and then uses an object I created to represent the MIPS ISA to translate the registers and instructions to binary.

The simulator is a fucking joke, though. So easy. literally just an execute interface for each instruction type and then an array and hashmap for the instructions and register structure along with a PC. Its a fun project.
>>
>>60167088

You should JIT compile the MIPS opcodes into x86-64 opcodes, instead of interpreting them.
>>
Do people actually unironically use emacs instead of Atom or Sublime Text? For what benefit?
>>
>>60167103
This is going to get into a theory of languages shit very soon, but ill just say that an instance of an object != a value. There's allocation involved. for the reference that holds the object. You don't need encapsulation/inheritance/composition to have an OOP concept involved and tied to it.

It's not always more convenient to use, simply convenient when people don't know what the fuck they're doing.

In a sense, if you really wanted an alternative theoretically, assigning types to file pointers to be cleaned up on scope exit, rather than having to chuck it into a class for that to happen, would be the best alternative, in a meaningful type such as the IO monad
>>
>>60167200
Keybindings are too damn convenient
>>
>>60167200
I use Vim because I enjoy writing programs at sanic speeds
>>
>>60167200
>Atom or Sublime Text
The real question is why would you use slow JS shit or proprietary shit?
>>
>>60167213
Any competent text editor has keybindings, but some of them aren't ugly af
>>
>>60167213
If you want to ruin your pinky.

Vim is where it's at if you're already spending the time to learn a half-esoteric text editor (at least, in this day and age, not so much 15 years ago)
>>
File: 1492969968509.jpg (143KB, 794x782px) Image search: [Google]
1492969968509.jpg
143KB, 794x782px
I have my heart set on building a bytecode interpreter in a fast language, because I'm a nerd.

Do I use C, C++, or Rust?

C string handling would be hell so I can't really write the assembler in that, I guess I'd copy-and-paste uint values for instructions into a python program or some shit?

Rust would be... weird, because casting things in Rust is painful and you'd lose all of your safety guarantees anyway, writing everything in unsafe { } blocks.

C++ is C++ and therefore is a clusterfuck. Also fewer languages have FFI for C++ than languages that have FFI for C.
>>
>>60167204
You keep bringing up classes and objects for no reason. And RAII doesn't mean that you have to allocate the data on the heap and use it by reference.

>It's not always more convenient to use, simply convenient when people don't know what the fuck they're doing.
Ah yes, I don't know what the fuck I'm doing when I use RAII and exceptions instead of writing error handling code around every single operation that could fail so I can manually call the destructor.

>In a sense, if you really wanted an alternative theoretically, assigning types to file pointers to be cleaned up on scope exit, rather than having to chuck it into a class for that to happen, would be the best alternative, in a meaningful type such as the IO monad
This is a false dichotomy.
>>
File: you.jpg (1MB, 3840x2160px) Image search: [Google]
you.jpg
1MB, 3840x2160px
>>60167200

Atom
>he actually uses a web browser to edit text
>laughingsluts.jpg

Sublime
>nagware

If you're gonna use a modern text editor with comfy plugin support, color schemes, high level of customization, integrated terminal, and syntax highlighting and auto-completion, just us VS Code.

If you're gonna use a CLI text editor there is no reason to not use VIM. Also, don't come to DPT and start a text editor war.
>>
>>60167223
>but some of them aren't ugly af
who cares
>>60167230
Use your right thumb more senpai
>>
>>60167232
>because casting things in Rust is painful
Writing "as" is painful?

>and you'd lose all of your safety guarantees anyway, writing everything in unsafe { } blocks.
Why?
>>
>>60167195
Neat
>>
>>60167232
>casting things in Rust is painful
x as i32
Also do not use transmute.
>>
>>60167237
VS Code is built with electron; with that said its performance is better than Atom. I don't know why.
>>
>>60167200
they were memed. first they are told it's a leet tool for pro gamers, then to keep them in they are introduced to bs like crazy keybindings so they can feel like they are being productive even if they could do the same on notepad
>>
>>60167248
>>60167252
Writing a bytecode interpreter involves taking raw byte blobs and fucking with them *a lot*, so it'd have to use transmute constantly, basically.
>>
>>60162346
>Pink keyboard
>Mac
OP refrain from posting non-anime images or else your mother will die tonight.
>>
>>60167254
Because the plugins are not shitty
>>
>>60164551
>But in private, naked coding with socks on is the only way.
so the panties and skirts are only for public places?
>>
>>60167271
In any case, even if you use a lot of unsafe blocks you can still use all your safe APIs and retain their guarantees. It's still only the unsafe operations themselves that you have to be responsible for.
>>
>>60167232
Ada would be ideal, but unless you know Ada, you'd be writing C++ with a different syntax.
>>
File: 0qz2Lm9h.jpg (8KB, 480x360px) Image search: [Google]
0qz2Lm9h.jpg
8KB, 480x360px
>>60167254

Yeah, to be honest I hate JS and webfags so much that I have reservations about using it, but then at the end of the day im not going to stop using a tool that I enjoy and increases my productivity because of a fucking meme.

VS Code is like 10x faster than atom so I just use it anyway and just deal with knowing what it really is. Electron has some nice niche uses like bringing a pseudo-native feel to google play music with the desktop player, but thats all I can think of right now. I stopped using atom when I tried to open a file with >1000 LOC and it choked and lagged on a 4790k w/ 16GB of RAM. Un-fucking-acceptable.
>>
>>60167233
If it doesn't then why does it work that way? Are you saying the pointer to a class doesn't have a pointer allocated to it as well?

> blah blah raii
I mean when in rome, do as the romans do. Don't stop using RAII because you're writing C++, there isn't a better alternative in that language, but if we're talking possible implementations, there would be.

I'm done with this discussion though. Clearly you're taking the C++ dick in so hard you can't look elsewhere. Godspeed.
>>
how do I compile an if clause
>>
>>60162346
what editor are they using?
>>
new thread: >>60167324
>>
>>60167318
>If it doesn't then why does it work that way? Are you saying the pointer to a class doesn't have a pointer allocated to it as well?
What the fuck are you talking about?

>I'm done with this discussion though. Clearly you're taking the C++ dick in so hard you can't look elsewhere. Godspeed.
Rust has way better RAII than C++.
>>
>>60167327
>Posted right on 310
>Still on page 1
Good job truncating discussion, idiot.
>>
>>60167322
Sublime
>>
>>60167331
at least i waited for the bump limit
>>
>>60167232
You could use C++ but only use it as a C + STL String. What would you need the string for in a bytecode interpreter though?
>>
>>60167356
Why would you pull in all of the retardation that is C++ just to use something as useless as their strings.
>>
>>60163030
I finally know this feel.
Implementing a set partition generator in Lua I've figured it out perfectly, but everything was fucking up because my set library was broken.

Also spent time implementing function objects that allow me easily compose and curry functions because you can't set metatables on functions.

I'm done.
>>
>>60167386
how can I be said to have "pulled in" anything if none of it is in my code? idk about strings it was op who said he needed it
>>
>>60167232
>bytecode interpreter in a fast language
In that case, Rust isn't an option for you. Use C with the computed goto extension.
>>
>>60167434
You pull in all of the inherent disadvantages of C++, and then lose basically of the shit C has done since C99.
>>
>>60167443
It doesn't have to be "fuck you" fast, it just has to be written in a language that is faster than Java.
>>
File: 1490595427023.png (216KB, 380x364px) Image search: [Google]
1490595427023.png
216KB, 380x364px
>>60166943
I made a program that returns the whole result. But the answer is 4.
import std.stdio;

void main(string[] args)
{
long_divide(22, 7, 500)[$ - 1].writeln();
}

int[] long_divide(int divident, const int divisor, const int decimal_limit)
{
int[] result = [divident / divisor];
if (divident % divisor != 0)
{
int remainder = divident % divisor;
int current_decimal_point = 0;
while (current_decimal_point < decimal_limit && remainder != 0)
{
divident = remainder * 10;
result ~= divident / divisor;
current_decimal_point += 1;
remainder = divident % divisor;
}
}
return result;
}
>>
>>60167476
Well, Rust is not that language.
>>
>>60167476
Rust, C, C++ are in the same category of speed. But he suggested C for a different reason.
>>
File: 1485646993138.jpg (41KB, 466x800px) Image search: [Google]
1485646993138.jpg
41KB, 466x800px
>>60167506
Well done akarin!
>>
>>60167527
>Rust, C, C++ are in the same category of speed.
C is consistently faster.
>>
>>60167527
>But he suggested C for a different reason.
Ahh.

I suppose C with the computed goto extension is by far the fastest for virtual machines?
>>
>>60167506
Shorter, more efficient version
import std.stdio;

void main(string[] args)
{
long_divide(22, 7, 100_000_000)[$ - 1].writeln();
}

int[] long_divide(int divident, const int divisor, const int decimal_limit)
{
int[] result = [divident / divisor];
if (divident % divisor != 0)
{
for (int current_decimal_point = 0; current_decimal_point < decimal_limit
&& divident % divisor != 0; current_decimal_point++)
{
divident = (divident % divisor) * 10;
result ~= divident / divisor;
}
}
return result;
}
>>
>>60167596
Computed goto allows you to explicitly write jump tables, which can be faster than a loop and switch. Also, it allows the branch predictor to accurately predict oppose pairs and triplets (if the opcodes are small and not brand heavy).
>>
>>60167593
The performance gap between the tree is negligible
>>
>>60167636
opcode pairs and triplets*
>>
File: 1463064892991.png (139KB, 270x360px) Image search: [Google]
1463064892991.png
139KB, 270x360px
>>60167622
>Rust programmer
>D code
>>
>>60167694
You forgot the (male) part
>>
>>60167698
No, I left that bit out on purpose
>>
>>60167698
All /dpt/ posters are women pretending to be men
>>
File: 1491887234140.png (1MB, 1039x988px) Image search: [Google]
1491887234140.png
1MB, 1039x988px
>>60167810
>>
>>60167636
What?
>>
>>60162450
right click and save page as.... (?)
Thread posts: 340
Thread images: 45


[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.