Quantcast
[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology


View post   

[ Toggle deleted replies ]
File: 45 KB, 768x552, nodejs.jpg [View same] [iqdb] [saucenao] [google] [report]
65725865 No.65725865 [Reply] [Original] [archived.moe] [rbt]

Old thread: >>65719712
What is /g/ working on?

>> No.65725909

first for elixir

>> No.65725910

>>65725904
degenerate

>> No.65725921
File: 11 KB, 927x148, anal beads.png [View same] [iqdb] [saucenao] [google] [report]
65725921

>>65720441
>These two guys are giving Hime some trouble! They're watching her every move, she needs to text her friends secretly to come pick her up! Write her a function that allows her to send a secret encoded message to her friends. The function will accept a normal "dummy" message and the secret text to be encoded with it. It will capitalize the letters in the dummy message according to the secret text.

friendly reminder not to try to write sane code drunk at 6AM. It ain't pretty, but it works. I will clean it up later.

string SecretMessage(string text, string message)
{
var place = 0;
text = text.ToLower();
Func<char, string, (string, int)> Replacer = (x, a) => ((place == 0 ? string.Empty : a.Take(place).Pipe(string.Concat)) + new Regex(Regex.Escape(x.ToString())).Replace(a.Skip(place).Pipe(string.Concat), x.ToString().ToUpper(), 1), a.Skip(place).Pipe(string.Concat).IndexOf(x) + place);
message.ForEach(x => (text, place) = Replacer(x, text));
return text;
}

>> No.65725952
File: 29 KB, 482x800, bretty.gif [View same] [iqdb] [saucenao] [google] [report]
65725952

>>65725921
>6am

>> No.65726041
File: 99 KB, 644x960, 31444640_2016736421909334_3286950433112719360_n.jpg [View same] [iqdb] [saucenao] [google] [report]
65726041

does anyone have those cool roll 0-99 for a programming challenge lists?
the more the better

>> No.65726051

>>65726041
Here's one: https://better-dpt-roll.github.io/
Now fuck off and stop trying to shit up the thread.

>> No.65726052

>>65726041
no

>> No.65726264

Im trying to make a audio visualizer, but i cant figure out how to capture the ouput of pulseaudio..

>> No.65726269
File: 106 KB, 870x490, 1499843626616.jpg [View same] [iqdb] [saucenao] [google] [report]
65726269

>>65725865
I made a hashmap in c and learned how to make it a library using cmake

>> No.65726310

>>65726269
`-c' ?

>> No.65726339
File: 45 KB, 630x478, 766a53c.jpg [View same] [iqdb] [saucenao] [google] [report]
65726339

Recently had to use R, it is the worst fucking trash that people use unironically

>> No.65726353

>>65726339
Agreed

>> No.65726359

>>65726310
I dont understand

>> No.65726366

>>65726339
switch to M

>> No.65726372

>>65726366
t. datadata

>> No.65726379

>>65726359
gcc with the `-c' switch makes object files

>> No.65726395

>>65726379
Nice

>> No.65726399

>>65726379
>c
>objects
no

>> No.65726405

>>65726399
>Doesn't know what object files are
You don't know C.

>> No.65726503

someone link a /dpt/ discord or irc

>> No.65726522

>>65726503
there isn't one

>> No.65726536

Should I go to this bank job interview, or will I end up working on ancient cobol mainframes?

>> No.65726549

>>65726522
>>65726503
there is one but it's quite literally dead most of the time
>>65726536
maybe, but they would put that into the description
also, cobol is not boring

>> No.65726620

>>65726399
object FILE, not object period
https://stackoverflow.com/questions/7718299/whats-an-object-file-in-c#7718363

>> No.65726625

>>65726620
yeah just continue your sperging you autistic fuck

>> No.65726637
File: 66 KB, 680x680, sweetie.jpg [View same] [iqdb] [saucenao] [google] [report]
65726637

>>65726625
???
I only responded to you once and in a nice manner too

>> No.65726648

>>65725652
sauce?

>> No.65726677
File: 6 KB, 197x200, yamero.jpg [View same] [iqdb] [saucenao] [google] [report]
65726677

>>65726648
>>65725910

>> No.65726688

>>65726677
I'm not him
also, I want a gf like that

>> No.65726696

>>65726688
ok, but you're asking on the wrong board

>> No.65726767

will black helicopters come for me in the night if i change my computer and router to use 1.1.1.1 or 1.0.0.1 for dns

>> No.65726776

>>65726767
I think you can't even do that can you?

>> No.65726823

>>65726776
course you can. it's a free country.

>> No.65726839
File: 5 KB, 195x259, 390472134823.jpg [View same] [iqdb] [saucenao] [google] [report]
65726839

>>65726688

>> No.65726867
File: 15 KB, 500x297, 1524769655798.jpg [View same] [iqdb] [saucenao] [google] [report]
65726867

What should I do first: learn C, Python, Lisp, or read SICP?

>> No.65726869
File: 72 KB, 220x336, 1496745340946.jpg [View same] [iqdb] [saucenao] [google] [report]
65726869

>>65726366
If I wanted to use some even more obscure shit I'll just use asm

>> No.65726884

>>65726867
C++.

>> No.65726892

>>65726867
-what's your background
-what do you want to do with the knowledge

But generally speaking, I enjoy C the most out of those options.

>> No.65726909

>>65726892
>background
NEET who's interested in tech and wants to learn useful shit
>what do you want to do
I'm not sure really, just hobby stuff.

>> No.65726933

>>65726625
I'm sorry to be the one to tell you, but you're a brainlet, son

>> No.65726937

>>65726869
>M
>obscure

You might be confused.

>> No.65726941
File: 919 KB, 3840x2129, scrot.jpg [View same] [iqdb] [saucenao] [google] [report]
65726941

post a screenshot of your text editor

are you afraid of people seeing your code?

>> No.65726967

>>65726909
Do you have any previous knowledge whatsoever?
If not: read K&R for C or SICP for Lisp, both are great starting points.
Don't start with python ever, it might seem simple but trust me it'll get confusing soon enough.
If you like micro-managing memory and being a bit of a wild west cowboy, C is fun.
I don't know much about lisps though, someone else will have to fill you in.
But in general, I wouldn't recommend lisps to beginners because there are some rudamentory things that you need to understand before delving into fp and lisps are not the best for learning these basics.

>> No.65726977

>>65726941
>text editor
What are you, in high school?

>> No.65726996

>>65726977
you're trying too hard there /b/uddy

>> No.65727032

>>65726941
Are you writing own language that compiles to Rust bytecode?

>> No.65727044

>>65726941
editor & colour scheme?

>> No.65727065

>Decide to give reverse engineering and programming a shot. It's always interested me, but seemed so foreign.
>Remember a game I loved to play called Infinite Crisis, was a DC Comics MOBA that had the servers killed.
>Track down the files, .pck, .dll, .bik, and a few .exe
>Oh boy. I feel like an idiot, but I'm sure /g/ would be right at home and I doubt they're even hard to figure out.
>Looking for the SLL file, can't find it.
Any good resources to read to help me out? I opened a file called "TurbineLauncher.exe.config" and got

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>

<!-- skin url -->
<add key="URL.FallbackSkin" value="{lang}/launcher.html"/>

<!-- Login Server -->
<add key="LoginServer.Protocol" value="https"/>
<add key="LoginServer.Host" value="ls.infinitecrisis.com"/>
<add key="LoginServer.Port" value="443"/>
<add key="LoginServer.Auth" value="WebLoginApp-1.3/AuthenticateWS"/>
<add key="LoginServer.Launch" value="WebLoginApp-1.3/LauncherWS"/>
<add key="LoginServer.Reporting" value="WebLoginApp-1.3/Metrics"/>

<add key="URL.SkinVersion" value="2.0.1"/>

</appSettings>
</configuration>

But, for the most part, everything seems clearly marked in the few .dll files I browsed with dotPeek

>> No.65727128

>>65726867
SICP.
You'll actually learn to program, not just code in a particular language.

>> No.65727198

So I have a list with X elements in it and I want to pass all of them to a function, but I don't know how many elements I have in it (X can be 5, 50, 100, etc.).

How can I pass all of them to a function in Python?

>> No.65727213

>>65727198
Just pass the first element of the list to the function and then traverse all its elements. That's the whole point of a list, being able to not care about the size.

>> No.65727231

>>65727044
my own editor
my own colour scheme

>> No.65727236

>>65727198
What function? If it's one that you're writing yourself, you can just take a list as a parameter, otherwise, use the star operator - https://www.python.org/dev/peps/pep-3132/

lst = [1, 2, 3, 4]
fun(*lst) # == fun(1, 2, 3, 4)

>> No.65727246

>>65727236
The star operator did it for me. Thanks.

>> No.65727284

>>65727236
Now how do I do this in Haskell?

>> No.65727295

>>65727284
zipWith

>> No.65727299

>>65727284
hieroglyphics

>> No.65727302

>>65727246
Use a for loop :^)

>> No.65727313

I have a program that downloads images from a website. Now I want the program to do its magic at a fixed time interval.
I have two possible solutions. Create a cronjob that spawns the program at a fixed interval. The other solution is to run the program indefinitely by using a while loop and the sleep function.
What are the pros and cons of either solution?

>> No.65727321

>>65727302
meant for >>65727284

>> No.65727360

>>65726625
t. retard

>> No.65727387

>>65727284
What's the question

>> No.65727429

Haskell has 3 major problems that are completely distinct in my opinion.

>Biggest technical problem:
lazy evaluation.

>Biggest cultural problem:
technical oneupmanship and code golf. Haskellers can get so caught up in no-compromises stylistic competition that it makes it hard to get anything done. If you finally finish up something that accomplishes your goals, your teammate is gonna come in and rewrite everything you just wrote so he can feel happy with it too. And then lecture you about how lenses are wonderful and how you need to learn the principle of least power.

>Biggest community problem:
a small minority of extremely obnoxious and toxic assholes. They raid other communities and make fun of their languages and members. They rant against and mock everything deemed inferior. They treat people like they're idiots for not understanding basic but unfamiliar principles of the language. And nobody ever seems to shut them down, despite the fact that the majority are pretty welcoming.

>> No.65727448

>>65727429
What the fuck is wrong with lazy evaluation?

>> No.65727454

>>65727429
Lazy evaluation is not a problem. If you don't like it, you can force arguments to be strictly evaluated.
>code golf
True
>obnoxious assholes
We like it that way

>> No.65727494
File: 18 KB, 628x578, the_reason_i_get_up_in_the_morning.png [View same] [iqdb] [saucenao] [google] [report]
65727494

66th for OCaml

Use OCaml

>> No.65727498

>>65727429
Haskell isn't the problem, it's those who criticize the language.
Haskell is in the category (no pun intended) of academic languages. It's perfectly fine to put category theory into practice, but not for mainstream use. We have C#, Java and C++ for that.

>> No.65727501

>>65727494
it's shit

>> No.65727514

>>65727501
Name one (1) thing OCaml can't do.

I'll wait

>> No.65727522

>>65727514
unsigned types
native threads
macros, have to use some shitty compiler extensions

>> No.65727526

>>65727514
be successful :^)

>> No.65727536

>>65727522
>unsigned types
Why would you need that?

>native threads
OCaml has a multiprocess philosophy. It is, effectively, as good as multithreading (better, even, since there's no shared memory space to corrupt).

>macros
Write your own extension to OCaml using ocamllex and ocamlyacc.

I'm still waiting for something that OCaml can't do.

>> No.65727545

>>65727526
OCaml is successful. It is used in many real world settings. Google Jane Street, for example.

>> No.65727553

>>65727545
OCaml is just by Jane Street and .... uh ... uhm ... *sweats* ... <random hipster startup>.

>> No.65727560

>>65727536
>Why would you need that?
Sounds like another case of blub. Pack it up, boys.

>> No.65727575

>>65727494
OCaml vs. ML?

>> No.65727578

>>65727553
Would you dismiss someone saying that C is successful because the only example they could think of was the GNU/Linux system?

>> No.65727583

>>65727575
Ignore both and use Lisp.

>> No.65727591

>>65727514
>one thing OCaml can't do
more than one thing.

>> No.65727620

>>65727494
I’m currently working on a Brainfuck JIT executor with LLVM in OCaml. So far I’m loving the language. I only picked it up because it seems it’s the only language with decent llvm bindings (except for C++ I guess).

>> No.65727621

>>65727514
name anything lol

>> No.65727633

>>65727536
OCaml doesn't have a multiprocess philosophy. The designers of OCaml regret their language relies on multiprocess for threading and doesn't have in-built facilities beyond that.
They haven't fixed it yet because multiprocess is "good enough," putting proper support as low priority.

Don't try to sympathize with this. Multiprocess approach has worked thus far because it's been relatively unimportant. But now with Go, Ruby getting guilds, Elixir, Rust, and a lot of other languages either getting first class support for parallelization or being designed for it from the ground-up, well, OCaml should probably get with the times.

>> No.65727644

>>65727583
CL vs Scheme?

>> No.65727650

>>65727065
when you reverse engineer something you usually have a goal in mind

>> No.65727657

>>65727578
I'm just pulling your leg senpai. As far as functional languages (Lisp, Haskell, ML) go, OCaml is the most popular one throughout the industry. It's still on my list to dive into some day.
What makes OCaml interesting for me, is it's point on parallel computing. Multithreading is absolute cancer. Multiprocess is the way to go.

>> No.65727665

>>65726941
>are you afraid of people seeing your code?
NDA. So yes.

>> No.65727674

>>65727644
Use Scheme if you're an idealist. Use Common Lisp if you're a realist.

>> No.65727686

>>65725865
>Heaviest

>> No.65727690

>>65727665
Only retards sign NDAs.

>> No.65727694

>>65727690
retards and employed people

>> No.65727704

>>65727694
>he doesn't have the balls to say no

>> No.65727714

>>65727313
Having done something like this multiple times always go the cron route. Cron is pretty easy to use once you get the hang of it. Also doing an infinite loop + sleep forces your functionality to be a persistent job, as opposed to being able to run it ad hoc if the need arises.

>> No.65727728

>>65727704
are you 12 years old? jobs require you to sign NDAs for projects and if you don't do it you don't get hired

>> No.65727749

>>65727728
i'm a programmer and this hasn't happened once

>> No.65727758

>>65727704
What benefit does it give me to share my code with you?
Open myself up to someone stealing my project?
When things are complete, I can negotiate to have them made public if I can make the case for it.
Not even my boss sees my code.

>> No.65727761

>>65727728
you mean jobs in western cuck america

>> No.65727781

>>65727761
I guess it depends on how high profile your job is

>> No.65727785

>>65727758
i don't care to see your code
however, signing NDAs is indeed retarded.

>> No.65727814

>>65727714
Than we'll take the cron route. I actually use systemd timers, but they're basically identical.

>> No.65727842

>>65727728
Not for personal projects. Proprietary code sure given that it is property of the company, but stuff you do on your spare time off the clock is on you.

>> No.65727889

>>65727842
>but stuff you do on your spare time off the clock is on you.
haha no american mega corporations like google etc make you basically surrender all rights to any code you write at any time while employed

>> No.65727901

>>65727842
most companies require you to sign over the stuff you do off the clock too but that's not related to NDAs thats something else

>> No.65727914

>>65727690
>>65727704
>>65727785

Even if you didn't sign an NDA, giving away code (i.e. intellectual property) your company paid for you to write is not advisable.

>> No.65727933

>>65727901
that's generally unenforceable in cali iirc, but elsewhere, you have to watch out for that.

>> No.65727952

>>65727933
how is it unenforcable? if you create something successful your employer (or ex-employer) can find out about it fairly easily

>> No.65727962

>>65727952
as in, if the company tries to bring a case against you, it will likely get thrown out.

>> No.65727975

>>65727901
Most contracts will specify that the personal project has to be related in some way to the actual job, and it's a legal requirement that some of it has to be done during normal business hours for a company to have claim to it, unless you're stupid enough to use actual work code in it.

>> No.65727998

>>65727933
>>65727962
what part of the californian code makes it different from any other state?

>> No.65728031

>>65727998
https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=LAB&sectionNum=2870

>> No.65728061

>>65728031
thanks

>> No.65728109

Reposting from /sqt/:

Sup /g/. I'm having trouble starting a simple date RPG in Netbeans using JavaFx as a practice and as a joke for my friend (since he is a waifufag). I could have finished it in a few hours if I was doing it text-based or in a day using Swing but I want to practice using Fx since it is the defacto replacement for Swing. I've used Fx once before but only for basic tutorial programs and such. Do any of you have any tips on making these kinds of GUI's before I make a huge clusterfuck or have a better alternative?
The game would be similar to the old style flash sim date RPGs (including pictures/maps for locations). Thanks!

>> No.65728121

>>65728109
do it in Lisp

>> No.65728122
File: 18 KB, 480x360, 41834918394123.jpg [View same] [iqdb] [saucenao] [google] [report]
65728122

How does shit get to millions of lines of code?
https://informationisbeautiful.net/visualizations/million-lines-of-code/

>> No.65728144

>>65728122
when you get a lot of developers together, it's not too difficult over time. everyone makes a change here or there that adds 10-20 lines. do that every other day per dev and it adds up.

>> No.65728184

>>65727578
ok this bait is really weak

>> No.65728226

Working on an xposed module that unlocks the paid version of apps.
How can I do something like this (I was thinking hashmap, but it can't have functions as the values)? I want O(1) lookup.
main(app):
app.name='this' -> hookThis(app)
app.name='that' -> hookThat(app)

Preferably without writing everything twice.

>> No.65728231

>>65728122
If you take out all the drivers and architecture specific stuff then the linux kernel is easily less than a million lines of code.

>> No.65728247

>>65728226
I don't know what language you are using but in most languages you can store a function in a value, in one way or another, but what you're doing here is calling a function and storing its return value instead. You would have to store just hook* and then call that value with app as parameter.

>> No.65728249

>>65727536
>Why would you need that?
For natural numbers?

>> No.65728255

>>65728122
>>65728231
https://unix.stackexchange.com/a/223763

>> No.65728264

>>65728247
Oh, sorry. Java.
When I get home I'll try doing that.

>> No.65728270

>>65728249
In lisp, this is just:
(deftype nat ()
`(integer 0 *))

>> No.65728277

>>65727650
My goal, ultimately, would be able to have the game being able to be played again. No extravagent features, no additional characters that were never added, etc. Just the game working as it did the day the servers went down. A lot of the projects I see always aim to add more content and all that jazz, but that's really not something I want to do or think needs to be done.

>> No.65728345

>>65728121
If I end up using LISP what IDE, etc would you recommend?

>> No.65728386

>>65727690
>>65727704
>>65727749
>>65727761
>>65727785
are you retarded? any given tech company will require you to sign an NDA. what exactly do you think an NDA is? they're to prevent you from sharing company secrets/code or making personal legal claim to code you wrote for the company

>>65727889
>>65727901
that's bullshit. i suppose i can't personally speak to how it is at google, but i've worked at several tech companies including microsoft and their contracts have only ever made claim to code written on company time and/or using company resources. not that it'd ever hold up in court anyway if a company tried to claim your legitimately separate personal project. maybe a different story if the project were really similar in nature to or clearly competed with a project you worked on at the company (since at that point it would be legitimately difficult to argue that your project shared no code with and wasn't informed by your work on / knowledge of the company project)

>> No.65728395

>>65725865
why did you crop out the last diagram to the right which depicted ur mum?

>> No.65728401
File: 214 KB, 400x400, welp.png [View same] [iqdb] [saucenao] [google] [report]
65728401

>>65728395
gottem
>>65725865
rekt

>> No.65728423

Ideas for a summer project? Currently reading through deep learning introduction and probably read through some of the Humble Bundle ML books I bought
Currently I am thinking of making a web scraper to download images from this shithole and sort by boards, maybe do some intelligent image sorting afterwards when i know enough about ML
i know java, c#, c/c++, mostly those type of langs

>> No.65728429

>>65728386
>tech company
that's your problem.
t. dev working in a comfy role in a non-tech company

>> No.65728455

>>65728423
make a bot for a card game you like using neural networks

>> No.65728470

>>65728345
emacs + sbcl + slime + paredit + quicklisp

>> No.65728521

>>65728345
>>65728470
an easier way is https://portacle.github.io/

>> No.65728523

>>65728423
>i know java, c#, c/c++
No. No, you don't.

>> No.65728610

How does /dpt/ like their error handling in C?

>> No.65728614

>>65728610
>no monads

>> No.65728630

>>65725865
If sun is heavy then why does it flying in space?

>> No.65728635

>>65728630
really strong string

>> No.65728640
File: 211 KB, 600x600, alijeres.jpg [View same] [iqdb] [saucenao] [google] [report]
65728640

>>65728610
I like not making errors

>> No.65728669

>>65728610
just pretend errors don't exist
http://clhs.lisp.se/Body/m_ignore.htm

>> No.65728681

>>65725865
https://gist.github.com/installgentoolinux/8eea682ad306520a45e9999f99f14eb6 D-D-Did I do good? P-P-Plz no h8, this i my first C++ p-p-project

>> No.65728692

>>65728681
cringe

>> No.65728703
File: 106 KB, 859x1024, 1525013416421.jpg [View same] [iqdb] [saucenao] [google] [report]
65728703

>>65728692

>> No.65728706

>>65728692
:(

>> No.65728710

>>65728703
dumb frogposter go back to >>>/r/ibbit

>> No.65728727

>>65728710
Nothing Found

>> No.65728779

>>65728727
either you're baiting or you're retarded, hope it's the first

>> No.65728794
File: 102 KB, 750x740, shb553i7zmu01.jpg [View same] [iqdb] [saucenao] [google] [report]
65728794

>>65728779
got him

>> No.65728809
File: 8 KB, 979x512, serveimage.png [View same] [iqdb] [saucenao] [google] [report]
65728809

>>65725865
Any good tutorials about making a command prompt game in c++?
It'd be great if they actually explain what's happening.

>> No.65728812
File: 1.61 MB, 3840x2160, ProgrammingChallenges, 4.0 (HD).png [View same] [iqdb] [saucenao] [google] [report]
65728812

>>65726041

>> No.65728828

>>65728812
Rolling for FUCK YOU

>> No.65728839

Any beginner programming books i should read?

>> No.65728865

>>65728839
R&K
SICP
literally anything but coding camps and tutorials

>> No.65728866

>>65728839
Practical Common Lisp

>> No.65728883

>>65728839

HtDP

>> No.65728902

>>65728883
>>65728866
>>65728865
Cheers thanks !

>> No.65728957

Do black holes even have weight?

>> No.65728969

>>65728957
yes

>> No.65728980

>>65728969
how would you know that?

>> No.65728999

>>65728957
yes, they have mass, otherwise their gravity would be 0N
https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation

>> No.65729026
File: 43 KB, 396x353, 1394924418614.jpg [View same] [iqdb] [saucenao] [google] [report]
65729026

>>65728980
my mother was killed by a black hole
they weigh heavy on my heart

>> No.65729060

>>65729026
sorry for your lots

>> No.65729073

>>65729060
she got better

>> No.65729116 [DELETED] 

>mods now block you from posting instead of outright banning
what is this shit

>> No.65729172

>>65728523
those are the only languages that i have used is what i meant, ofc i am not claiming that i _know_ them. i dont even know the syntax for JS, python

>> No.65729179 [DELETED] 

>>65729172
WHAT IS THIS SHIT

>> No.65729194

>>65729172
ignore the autism

>> No.65729249

>>65729073
where did she get that from?

>> No.65729251

>>65728812
might as well have a go

>> No.65729272

>>65729249
heaven

>> No.65729274

>>65729194
no. no

>> No.65729283

>>65725865
I had a question. I've seen a couple job listings for developer roles. Some listed as full stack developer positions that paid upwards of $100k AUD. The job listed a bunch of programming languages and technologies that were required knowledge and other stuff that wasn't required but was considered good to know.

Surprisingly, it didn't list a degree as a requirement. Now, I have seen some places list degrees and others not.

My question is, are these jobs difficult and are the required skills difficult?

>> No.65729291

>>65728999
That was a trick question, no they don't have weight, they have mass, but their mass is impossible to measure because their gravitational force is so high and unusual, that we don't have a formula for it, if we tried to measure their mass using already existing formulas for other celestial bodies the number would be illogically high and wrong.

>> No.65729299

>>65729283
Referring to being a full stack developer. I assume if its pay a lot it must be harder than other programming jobs.

>> No.65729356
File: 997 KB, 2880x1750, Screen Shot 2018-04-29 at 12.59.04 PM.png [View same] [iqdb] [saucenao] [google] [report]
65729356

>>65726941
You all know I love showing off

>> No.65729382

>>65729283
A degree won't really be a factor in determining whether someone is qualified for a job as full stack developer, there's no degree for that basically, though I am sure they'd see a degree in a related field as a plus point.

>> No.65729392

>>65728812
spare me anus

>> No.65729448

>>65729172
>i know java, c#, c/c++
>i am not claiming that i _know_ them
????

Either explain what you actually meant, or fuck off. Anyone who groups those four together so casually clearly has no idea what they're talking about.

>> No.65729469

Is doing this well defined?
uintptr_t encode(struct foo f)
{
static_assert(sizeof(struct foo) <= sizeof(uintptr_t);
uintptr_t retval;

for (size_t i = 0; i < sizeof f; ++i)
{
((char*) &retval)[i] = ((char*) &f)[i] ;
}

};

struct foo decode(uintptr_t p)
{
static_assert(sizeof(struct foo) <= sizeof(uintptr_t);
struct foo retval

for (size_t i = 0; i < sizeof retval; ++i)
{
((char*) &retval)[i] = ((char*) &p)[i] ;
}
}

>> No.65729472

>>65729448
ill take the bait
now write me a vhdl code to parse a text file
do you know how?

>> No.65729509
File: 276 KB, 380x377, amakejres.png [View same] [iqdb] [saucenao] [google] [report]
65729509

>>65729448
he's just listed the languages he's worked with and you're sperging out over it for the last 4 hours or so
take your medication please

>> No.65729543

>>65729509
>>65729472
What does this have to do with claiming to """know""" these four very different languages?

>> No.65729568

>>65729543
holy shit stop

>> No.65729639
File: 127 KB, 1000x1500, c8490a9cc5dc680917a3ee2abbaf6d74.jpg [View same] [iqdb] [saucenao] [google] [report]
65729639

Do any of you guys make money doing this from home? How much experience (considering I'd be of average aptitude) would I need to have before I can safely earn like 200 dollars a month doing this?

>> No.65729647

>>65729469
why not use a union?

>> No.65729674

>>65729251
okay it's been awhile, for a linear fit, is it enough to do a linear system and find a polynomial that fits the data the best?

>> No.65729697

>>65728640
thats not what error handling is about, dimwit

>> No.65729762

>>65728610
Use return values and enumerated error codes. Set logical return values using out parameters.

>> No.65729765

>>65728809
what type of command prompt game, anon. there's a wide range.

>> No.65729790

>>65729697
I know retard
>what are jokes

>> No.65729794

>>65728812
let's try

>> No.65729797

>>65729790
your jokes are shit

>> No.65729804

>>65729469
yeah aside from the syntax errors and lack of returns.

>> No.65729836

>>65728681
you don't need to call srand for every rand call. use it once at the start of the program.

>> No.65729898

I want to make a simple short RPG game so I have something to put on my resume.

Is C the recommended language for this?

>> No.65729906

What alternatives to c++ are there that are clean/

>> No.65729920

>>65729906
D
"C++ but clean and modern" was literally the whole aim of the language's design

>> No.65729923

>>65729898
No one will actually give a shit.

>> No.65729935

>>65729906
There is no C-inspired language that is clean.

>> No.65729940

how do i do
3 * ["foo"] // ['foo', 'foo', 'foo']

in javascript?

>> No.65729943

>>65729898
JS

>> No.65729948

>>65729906
Depends on what are you trying to accomplish.
>>65729920
It is sepples on a higher level but also slower.

>> No.65729955

>>65729920
but then it added a gc and a load of shit even more stupid than C++ (e.g. variant)

>> No.65729959

>>65729935
Define clean.

>> No.65729968

>>65729955
i don't use D myself, but can't the gc be disabled?
>>65729948
>but also slower.
he asked for a clean C++ alternative, which D is, he said nothing about one that was equal in speed

>> No.65729971

>>65729959
>>65729906's definition of clean

>> No.65729974

>>65727823
what is the flaw in the argument? if the encryption isn't client-side, the server knows about it, and can just decrypt it locally

>> No.65729977

>>65729968
then you lose half of the language's features and even more of the standard library

>> No.65729982

>>65729971
So why did you bother answering?

>> No.65729992

>>65729982
Why did you bother responding to my answer?

>> No.65730003

>>65729968
>he said nothing about one that was equal in speed
True, but D is still a half baked PL.

>> No.65730017

>tfw after working twelve hours last night decided to read about Satanism instead of practicing programming..

>> No.65730021

>>65729992
Because I wanted to know what is your definition of 'clean' that made you say anything influenced by C is not clean.

>> No.65730028

>>65729977
>then you lose half of the language's features and even more of the standard library
damn, it's that dependent on its gc?
that fucking sucks
especially the standard library, what dimwit thought using the gc in the standard library was a good idea? the whole point of a standard library is to implement things in the most complex and hyper-efficient ways so you don't have to
if it isn't doing that, why bother with a standard library

>> No.65730041

>>65730017
Nice blog (©:

>> No.65730045

>>65730017
>not combining them and making SMT a reality
pleb desu

>> No.65730055

>>65730028
I recall some D shill saying the GC is optional though.

>> No.65730056

>>65730028
garbage collection did nothing wrong

>> No.65730065

>>65728812
rolio

>> No.65730067

>>65730056
For a lang marketed as better sepples, it did lots of wrongs.

>> No.65730098

>>65725865
Lisp is the most powerful programming language.

>> No.65730099

>>65726503
https://discord.gg/4TuhPhr

>> No.65730104

>>65730098
indeed

>> No.65730114

>>65730098
No

>> No.65730119

Is it still functional programming if you never return from a function and only call new lambdas?

>> No.65730126

>>65730098
Maybe

>> No.65730149

>>65729971
Has a very specific and focused standard library that provides basic functionality that I can use to make gui bsed applications for myself but doesn't prioritize team based development or maintaining legacy support. I'm looking for something that is enjoyable and functional that I can use to learn programming and pursue projects for myself but doesn't add complex solutions that might be necessary for a production level language to be used for Enterprise development. I want a compiled language though and greatly dislike working in interactive scripting environments.

Also I'd like something that is modern and has maybe experimental solutions to bproblems that exist in other languages. I don't care if the language doesn't have a lot of supporting plugins or libraries or if it will be useful to find a job. I just want something I can use to become a better programmer even if it's a meme language. Working with c and c++ programs is very confusing to me because of the Dev tools and build process.

>> No.65730152

>>65730119
(defun foo ()
(loop (funcall (lambda () (print "faggot")))))

>> No.65730157

>>65730028
>GC inherently makes things slow
>Actually wants to worry about managing his own memory

>> No.65730173

>>65730157
Why would you use an inexpressive imperative language like C++ unless such matters were important?

>> No.65730208

>>65728812
here we go

>> No.65730211

>>65730149
C# is the best compiled lang for writing GUIs. KeePass and dozens of windows applications.
It is dead simple (seriously easy) yet powerful enough to work directly with SIMD, libc.so, opengl and any GUI toolkit through bindings.
It has a rich API that does the job well and reduces dependency hell.
It has the con of m$ and basedboy programmers as opposed to pajeets for certain other langs.

>> No.65730221

>>65728470
portacle, if it works anymore

>> No.65730223

>>65730173
Are they? I'd like to know what people who shit on the GC actually work on that requires not having one

>> No.65730228

>>65730211
Alright I'm already using c# so I guess I'll just keep going then. I've been trying to get good at WPF applications.

>> No.65730289

>>65730228
Only use mvvm if you have a medium to large scale program.
You can use gtk core or gtk 2.0 w/ mono for cross platform (although there is also qtsharp).
WPF might be difficult for c# beginners.
Learn the programming side of System.Xaml like Visibility enum, elements and logical tree walkers.. etc and then learn the power of its bindings and styling after that.
God I hated working on GTK after my heavenly experience with WPF.

>> No.65730342

Is Lisp still used widely in the field of artificial intelligence, or has it been overtaken by more contemporary languages?

>> No.65730349

>>65730342
isn't python the hot thing in that field?

>> No.65730361

>>65729923
It's something I also want to do. Programming is kind of boring to me, maybe if I have something to strive for I'll be motivated enough to accomplish something.
>>65729943
JavaScript? Interesting suggestion.

>> No.65730372

>>65729765
Well I guess some sort of roguelike would do just fine. I need to show off OOP skills to my teacher as homework.

>> No.65730387

>>65730228
I'll also let you in on a secret, you can't modify gui from secondary threads without the UIContext and you will eventually need to know delegates(basically function pointers) and events (a store for delegates that invokes all subscribing delegates when the event is raised).

>> No.65730436

I want to write a function foo(a, b, c) which finds a solution x for exp(a*x)+exp(b*x)=c.
How can I solve this? I have no idea.

>> No.65730504

>>65730436
start with a lower bound and a higher bound
pick a value in between
if it's over make it the new higher bound
if it's under make it the new lower bound

this should get a close approximation of X within a only a few iterations

>> No.65730530

>>65728630
Your sun is so heavy it's the space that flies around it

>> No.65730532

>image uploading down
rip
how am I gonna poast my brainlet wojaks now?

>> No.65730557

>>65730532
on reddit

>> No.65730559 [DELETED] 

>>65730532
Probably adding image filters LOL

>> No.65730635

>>65730532
This is why text boards are superior. It weeds out shitposters.

>> No.65730637 [DELETED] 

https://youtu.be/nph9IW5KGbc
Hiroshimoot I can't live without shitposting don't kill a 4chan

>> No.65730639

how do i make a game with unity?
asking for a friend

>> No.65730652

>>65730639
Download the cracked version and learn C#.
OR simply XNA/monogame.

>> No.65730705

>>65729898
C is really annoying to work with for game development.
I'd recommend an OOP language and if you have to compute something really fast, just embed C or even assembly.

>> No.65730736

Whatsup guys.

Currently working on a framework

>> No.65730762

>>65730736
framework for?

>> No.65730785

>>65729898
For a resume? You'll want C, C++, JavaScript or C# depending on what you want to do. I use C and Scheme for my personal project. A simple rpg doesn't need to be written with manual memory management but if you want a job working on say game engines...

>> No.65730812

>>65730652
why the cracked version?

>> No.65730836

>>65730119
Nigga thats just continuation passing style.

>> No.65730841

im doing a ritual to help me be a better programmer..I've never started programming but i want to either be netowrking it or programmer when I grow up..I'm 26..tho..

>> No.65730892

>>65730841
how did you manage to age back 4 years

>> No.65730894

>>65730504
Thanks but I'm looking for a faster solution and computation in O(1). This is the broader problem.
I have a signal generator which produces a sum of amplitude-modulated waves. I want to predict how much time it will take for output to go above a certain peak amplitude.
Each wave multiplies with its own exponential AM envelope, and the values (a, b, c) change dynamically. (and x is the time variable)

>> No.65730910

>>65730841
you are grown up, faggot.
also, just start applying for jobs

>> No.65730924

>>65730894
find an exact solution

>> No.65730967

>>65730894
>waves
So are a, b, and c imaginary then?

>> No.65731026

>>65728109
>date RPG in Netbeans using JavaFx
you mean like a date sim?
why reinvent the wheel when you can just renpy dat ho?

>> No.65731073

>>65727657
>OCaml is the most popular one throughout the industry.
this is what ocamlfags actually believe
>inb4 what is scala

>it's point on parallel computing. Multithreading is absolute cancer. Multiprocess is the way to go.
this is the same delusional cope that the more retarded Pythonfags are using
just because the frogs haven't figured out MT GC yet (coming soonTM for a few years), doesn't mean that
>right tool for the job dont real
I mean haskfags have that shit on lockdown, though they have the advantage of purity making it an easier job

>> No.65731082

>>65725865
what's heavier than node_modules? Dem feels....

>> No.65731086

>>65727633
eh, if it works for their niche (as they are a niche after all), they can continue to run that race crippled

>> No.65731098

>>65727591
OHHHHHHHH

tfw frogcaml can't into
>two chicks at the same time man

>> No.65731113

>>65727545
>many
oh ho ho

>> No.65731123

>>65727536
>OCaml has a multiprocess philosophy. It is, effectively, as good as multithreading (better, even, since there's no shared memory space to corrupt).
translation
>its slow as fuck and unusuable

>> No.65731127

>>65727536
>>unsigned types
>Why would you need that?
java-tier garbage

>OCaml has a multiprocess philosophy. It is, effectively, as good as multithreading (better, even, since there's no shared memory space to corrupt).
hee hee

>> No.65731140

>>65727526
na das haskal mane

>> No.65731155

>>65727448
space/time leaks that require a PhD to debug, for starters

>> No.65731169

>>65727429
very good analysis tbhask

>> No.65731190

>>65727299
>hieroglyphics
nah you use those to implement go generics

>> No.65731260

Does anybody else not bother with sites like Codewars, etc, and just want to build your own projects and learn from your mistakes? I have no patience for cardio-type tasks when it doesn't end in something being created that I can use at my own leisure.

>> No.65731322

>>65731260
I tried one of those sites with community-generated problems but there was no unit testing in place so it was too easy to 'hack' a solution.
It really is best to read books and do it yourself.

>> No.65731328

>>65727454
>Lazy evaluation is not a problem. If you don't like it, you can force arguments to be strictly evaluated.
>just write everything in do blocks with the identity monad
Sounds fucking retarded. Might as well use C. What is it with haskell retards and refusing to acknowledge the shortcomings of their ideology/language?

>> No.65731390

>>65729836
yeah, but it outputs the same number for the different values, as it does it in the same time.

>> No.65731420

>>65730967
No a, b, c are real values. a, b are negative.
I reformulated my problem but I had my original equation written as
AM(t) = sum (i:1->n) [1 - exp(-rate(i) * t)]
Where n is number of waves (1 to 3), rate(i) are control variables. (I asked how to solve AM(t)=some constant level, and posed the problem for n=2)

>> No.65731454

>he doesn't use for-else in his python code

for i in range(5):
print(i)
else:
print('Iterated over everything')


output
0
1
2
3
4
Iterated over everything

>> No.65731469

>>65731454
>he uses python

>> No.65731497

>The C Programming Language
Will this book help me make programs that will run in Windows 10?

>> No.65731499

>>65731469
>he doesn't use python

lmao @ ur life

>> No.65731570

>>65731497
yes, there's a windows C compiler

>> No.65731603

>>65731328
>What is it with religious retards and refusing to acknowledge the shortcomings of their religion?
well, I mean, what can I say
All the sacrifices they made means they're running on some heavy duty https://en.wikipedia.org/wiki/Choice-supportive_bias

>> No.65731605

>>65726503
Here for IRC:
>https://kiwiirc.com/client/irc.rizon.net?channels=#/g/dpt

>> No.65731614

>>65726549
FYI IRC chan isn't dead.

>> No.65731626

>>65730652
>Download the cracked version and learn C#.
It's free.

>> No.65731633

need some opengl advice

i want to draw tiles. so I have vertex buffer with (n+1)^2 vertices. and i have a index buffer with the indices. all good so far.
however, how do I deal with the fact that every vertex has 4 different texture coords and the index buffer obviously doesnt match? can I somehow I find out in what triangle I am so I can use the proper uv's?

>> No.65731651

Is it portable to assume you can use the lower bits of a pointer if the alignment is sufficiently great?
void foo(SomeType *ptr)
{
static_assert(alignof(SomeType) > 2);

uintptr_t p = (uintptr_t) ptr;
bool someFag
p |= someFlag;

/* do whatever */

// clear flag bit
p |= 1; p ^= 1;
*(SomeType*) p;
}

>> No.65731678

>>65726503
are you a lisper?

>> No.65731690

>>65731390
not really.
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char const *argv[])
{
srand(time(NULL));

int a = rand() % 100;
int b = rand() % 100;
int c = rand() % 100;

printf("%d %d %d\n", a, b, c);

return 0;
}


outputs

33 47 4

>> No.65731727

is there big money in mainframes? should i learn COBOL?

>> No.65731731

Graduating in December with a Non-CS degree because I am a dumbass. So I have May til January, a solid 8-9 months to work on a solid project that will make me seem beautiful to employers, what should I focus on?

>> No.65731762

>>65730099
thanks

>> No.65731768

>>65731614
discord is tho

>> No.65731775

Randomly generate 1000 unique numbers ranging from 0 to 1000
how do i do this without the least penalty to check what I have generated?

>> No.65731785

>>65731651
In the absolute strictest sense, no. uintptr_t isn't guaranteed to exist if you can't cast a pointer to an integer.
I am not aware on any real implementations which people actually use which can't do that, though.

>> No.65731807

>>65731775
>Randomly generate 1000 unique numbers ranging from 0 to 1000

(shuffle (range 1000))

>> No.65731841

>>65731727
big iron
big money

>> No.65731910

>>65731731
Hentai management tool would be good, lots of data and information management on the back with a nice GUI on the front, most employers would like it.

>> No.65732062

>>65731731
become an os expert and write a linux driver

alternatively learn a development stack and launch your own SaaS web application, and get customers

>> No.65732099

>>65731731
anything involving a database.

>> No.65732131

>>65731454
>not doing try-except-finally-else
try:
pass
except (Exception, ):
pass
finally:
pass
else:
pass

>> No.65732136

>>65729639
>How much experience (considering I'd be of average aptitude) would I need to have before I can safely earn like 200 dollars a month doing this?
Not very much. If you're any good and get some decent experience, you should be able to get more than $200 a day. Perhaps way more. $200/month is a total pittance.

>> No.65732158

>"print" automatically appends a new line
shit lang

>> No.65732164

>>65727498
>Haskell isn't the problem, it's those who criticize the language.
Sounds like you're one of the problem category #3 assholes.

>> No.65732186

>>65728812
Yes lets create the earth in 7 days on a whim

>> No.65732193

>>65732131
What does this do?

>> No.65732201

>>65732193
This particular snippet? Nothing at all.

>> No.65732206

>>65732201
The control structure in general; under what conditions do the finally/else blocks execute?

>> No.65732236

>>65732206
I actually got the order mixed (finally should be swapped with else) but finally will always execute, no matter whether an exception is thrown or not, and else will execute if exception wasn't thrown.

>> No.65732237

Learning Pascal. The tutorial on tutorialspoint must have been written by some Pajeet, the type defs for example don't work at all like he says.
Anyways, I'm a bit confused about what exactly formatting floating point numbers does:

program AssFaggot;

var
tongue_my_anus: real;

begin
writeln('niggers');
readln(tongue_my_anus);
writeln(tongue_my_anus:7:2);
end.


I know the 2 truncates to 2 decimal places, but what does the 7 do?

Another thing that annoys me:

program FuckingSubranges;

type
dayoftheweek = (mon, tue, wed, thu, fri, sat, san);

var
int_subrange: 0 .. 9;
day_subrange: mon .. fri;

begin
writeln('Enter a positive integer smaller than 10:');
readln(int_subrange);
writeln(int_subrange, ' = 15: ', int_subrange = 15);
{I can compare subrange variables to numbers that aren't in the specified interval.}
{I get a compiler warning but that's it.}
writeln('Enter a weekday:');
readln(day_subrange);
writeln(day_subrange, ' = sat: ', day_subrange = sat);
{Compiler error.}
end.


Wouldn't it be way more sensible to either have the same warning for enumerated type subranges, or to have the compiler throw errors when you try to compare a subrange int to a value it can't have? What's even the point of subranges?

>> No.65732262

>>65732237
http://wiki.freepascal.org/Formatting_output

>> No.65732326

>>65732262
Thank you, that makes sense. Anything about the second part of my post?

>> No.65732400

Also comments are totally fucked in Pascal.

program Comments;

begin
{This line is a comment.}
{This line and the following line
belong to the same comment.}
(*This is also a comment.*)
(*You can use this across several
lines as well.*)
{
writeln('No, this won''t execute.');
}
{Now watch this: mismatched opening / closing quotes!*)
writeln('This line is executed even though there is no matching ',
'closing curly bracket for the one in the line above.');
(*This works the other way around, too!}
writeln('Fucking kill me already!');
end.

>> No.65732417

>>65732158
>print 'foo', doesn't
Perfection.

>> No.65732460

doing some of the semigroup excercises from the haskell book
-- Combine

newtype Combine a b =
Combine { unCombine :: (a -> b) }

fnAsc :: (Eq b, Semigroup b) =>
(a -> b) -> (a -> b) -> (a -> b) -> a -> Bool
fnAsc f g h x = (unCombine f' $ x) == (unCombine g' $ x)
where f' = Combine f <> (Combine g <> Combine h)
g' = (Combine f <> Combine g) <> Combine h

instance Show (a -> b) where
show x = "Combine Show"

instance Semigroup b => Semigroup (Combine a b) where
Combine f <> Combine g = Combine $ h f g
where h f g x = f x <> g x

>> No.65732721

>>65732460
jesus fuck

>> No.65732729

>>65732400
This isn't fucked up when you realize (* and *) were simply alternatives to { and } for keywords that didn't have these characters. They are supposed to be treated exactly the same way by the compiler.

C has the exact same "problem":
int main(void)
{
return 0;
%>

The above is perfectly valid because <% and %> are alternatives to { and }.

>> No.65732742

>>65732729
sorry, *keyboards, not keywords

>> No.65732763

>>65732460
jesus fuck

>> No.65732795

>>65728610
Dependent types proofs, translated from compiled Idris bytecode into a C stack machine

>> No.65732810

>>65732460
jesus fuck

>> No.65732833

If i have a main.c file that needs a function.c file to work, how can i create a makefile to compile them at the same time?

>> No.65732961

>>65732326
Not them, and I don't really know why the first only produces a warning either, but you can treat all warnings as errors with the -Sew flag to fpc:
fpc -Sew fuckingsubranges.pas

Only thing I can find that maybe explains the behaviour is in the ISO Pascal standard:
>6.7.1
>...
>Any factor whose type is S, where S is a subrange of T, shall be treated as if it were of type T.
>...
http://www.pascal-central.com/iso7185.html#6.7.1%20General

>> No.65733007

>>65732833
main: main.c function.c
cc -o main main.c function.c

>> No.65733277

onwards to the monoid exercies:
-- Mem
newtype Mem s a = Mem { runMem :: s -> (a, s) }

instance Monoid a => Monoid (Mem s a) where
mempty = Mem $ \s -> (mempty, s)
f `mappend` g = Mem $ \s ->
let (a', s') = runMem f s
(a'', s'') = runMem g s'
in (a' `mappend` a'', s'')

-- law tests
leftId x a = (runMem $ mappend mempty x') a == runMem x' a
where x' = Mem x

rightId x a = (runMem $ mappend x' mempty) a == runMem x' a
where x' = Mem x

monoAsc x y z a = (runMem $ mappend x' (mappend y' z')) a ==
(runMem $ mappend (mappend x' y') z') a
where x' = Mem x
y' = Mem y
z' = Mem z

type MemId s a =
(s -> (a, s)) -> s -> Bool

type MemAsc s a =
(s -> (a, s)) -> (s -> (a, s)) -> (s -> (a, s)) -> s -> Bool

main :: IO ()
main = do
quickCheck (leftId :: MemId Int String)
quickCheck (rightId :: MemId (Maybe Int) String)
quickCheck (monoAsc :: MemAsc Bool String)

>> No.65733434

why is the programming community so toxic?

>> No.65733509

>>65733434
Fashion is fierce

>> No.65733523

>>65733434
>toxic
you need to go back

>> No.65733748

>>65728812
>1-145
bery inderesding rolling :DDDDD

>> No.65733751

Is it normal to struggle with bjarne's cpp book?
I feel sometimes I have no idea what he's saying, should I just go on and learn coding concepts and start working on simple programs or drop it for a simpler book?

>> No.65733780

>>65731731
Non-CS degree here. I wrote a video game.

>>65731633
I would recommend using instancing on a basic tile. Drawing with element arrays is poor performance for something with that few repeated elements, so just do n^2 instances of a 6 vertex object.

You can figure out what triangle you're in with gl_VertexID and which instance you're in with gl_InstanceID. I think even if your terrain is fairly static it will be much simpler to use instancing rather than trying to calculate where to look up UV coordinates in a texture based on the gl_VertexID.

t. wrote a minecraft clone.

>> No.65733943

>>65733751
bjarne's pretty dry, and goes an tangents too much.
Try the condensed one, or a scott meyers book.

>> No.65733957

>>65733751
Which one?

>> No.65733964

>>65733434
Autism is why.

>> No.65734073

>>65733751
bjarne's book is good for solidifying and fine-tuning your understanding of C++ if you already have an intermediate (or at least very solid beginner's) understanding of C++, or perhaps an advanced understanding of a similar enough language like C# or C

>> No.65734147

we're back (for now)

>> No.65734730

>>65731633
use separate vertices for each tile in the vertex buffer (n*4 total) which contain the texture coordinates for the boundaries of the tile's location in the texture atlas. then describe the 2 triangles of each tile in the element/index buffer (n*6 total, {0,1,2,2,3,0} or similar pattern). make these buffers STATIC_DRAW if you don't plan to mutate them after initially filling them

>>65733780
instancing isn't very efficient for such small primitives. and drawing element arrays is fine, and should generally be an improvement as long as it does reuse some vertices and such reuse is fairly local. rendering pipeline implementations utilize a "post transform cache" which can store and reuse the outputs of vertex shader invocations when vertices are referred to again by index. using indexed rendering also has the benefit of that each vertex is unique (exists at only one place in the vertex buffer), so in the event that you wanted to modify vertices (like for changing the texture coordinates of a tile to point to a different spot in the texture atlas), you only have to modify them for the 4 relevant vertices, rather than for 6 vertices (where 2 are unique, and the other 4 are duplicate pairs)

>>
Name (leave empty)
Comment (leave empty)
Name
E-mail
Subject
Comment
Password [?]Password used for file deletion.
Captcha
Action