[ 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


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

>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]


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

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

>> No.65726051

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

>> No.65726052


>> 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]

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

>> No.65726310

`-c' ?

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

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

>> No.65726353


>> No.65726359

I dont understand

>> No.65726366

switch to M

>> No.65726372

t. datadata

>> No.65726379

gcc with the `-c' switch makes object files

>> No.65726395


>> No.65726399


>> No.65726405

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

>> No.65726503

someone link a /dpt/ discord or irc

>> No.65726522

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

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

>> No.65726620

object FILE, not object period

>> No.65726625

yeah just continue your sperging you autistic fuck

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

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

>> No.65726648


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


>> No.65726688

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

>> No.65726696

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 or for dns

>> No.65726776

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

>> No.65726823

course you can. it's a free country.

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


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

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]

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

>> No.65726884


>> No.65726892

-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

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

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

>> No.65726937


You might be confused.

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

post a screenshot of your text editor

are you afraid of people seeing your code?

>> No.65726967

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

>text editor
What are you, in high school?

>> No.65726996

you're trying too hard there /b/uddy

>> No.65727032

Are you writing own language that compiles to Rust bytecode?

>> No.65727044

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" ?>

<!-- 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"/>


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

>> No.65727128

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

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

my own editor
my own colour scheme

>> No.65727236

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

The star operator did it for me. Thanks.

>> No.65727284

Now how do I do this in Haskell?

>> No.65727295


>> No.65727299


>> No.65727302

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

meant for >>65727284

>> No.65727360

t. retard

>> No.65727387

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

What the fuck is wrong with lazy evaluation?

>> No.65727454

Lazy evaluation is not a problem. If you don't like it, you can force arguments to be strictly evaluated.
>code golf
>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]

66th for OCaml

Use OCaml

>> No.65727498

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

it's shit

>> No.65727514

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

I'll wait

>> No.65727522

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

>> No.65727526

be successful :^)

>> No.65727536

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

Write your own extension to OCaml using ocamllex and ocamlyacc.

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

>> No.65727545

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

>> No.65727553

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

>> No.65727560

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

>> No.65727575

OCaml vs. ML?

>> No.65727578

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

>> No.65727583

Ignore both and use Lisp.

>> No.65727591

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

>> No.65727620

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

name anything lol

>> No.65727633

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

CL vs Scheme?

>> No.65727650

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

>> No.65727657

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

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

>> No.65727674

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

>> No.65727686


>> No.65727690

Only retards sign NDAs.

>> No.65727694

retards and employed people

>> No.65727704

>he doesn't have the balls to say no

>> No.65727714

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

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

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

>> No.65727758

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

you mean jobs in western cuck america

>> No.65727781

I guess it depends on how high profile your job is

>> No.65727785

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

>> No.65727814

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

>> No.65727842

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

>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

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


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

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

>> No.65727952

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

>> No.65727962

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

>> No.65727975

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

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

>> No.65728031


>> No.65728061


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

do it in Lisp

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

How does shit get to millions of lines of code?

>> No.65728144

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

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.
app.name='this' -> hookThis(app)
app.name='that' -> hookThat(app)

Preferably without writing everything twice.

>> No.65728231

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

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

>Why would you need that?
For natural numbers?

>> No.65728255


>> No.65728264

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

>> No.65728270

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

>> No.65728277

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

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

>> No.65728386

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

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

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]


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

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

>> No.65728455

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

>> No.65728470

emacs + sbcl + slime + paredit + quicklisp

>> No.65728521

an easier way is https://portacle.github.io/

>> No.65728523

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

>> No.65728610

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

>> No.65728614

>no monads

>> No.65728630

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

>> No.65728635

really strong string

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

I like not making errors

>> No.65728669

just pretend errors don't exist

>> No.65728681

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


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


>> No.65728706


>> No.65728710

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

>> No.65728727

Nothing Found

>> No.65728779

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]

got him

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

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]


>> No.65728828

Rolling for FUCK YOU

>> No.65728839

Any beginner programming books i should read?

>> No.65728865

literally anything but coding camps and tutorials

>> No.65728866

Practical Common Lisp

>> No.65728883



>> No.65728902

Cheers thanks !

>> No.65728957

Do black holes even have weight?

>> No.65728969


>> No.65728980

how would you know that?

>> No.65728999

yes, they have mass, otherwise their gravity would be 0N

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

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

>> No.65729060

sorry for your lots

>> No.65729073

she got better

>> No.65729116 [DELETED] 

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

>> No.65729172

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] 


>> No.65729194

ignore the autism

>> No.65729249

where did she get that from?

>> No.65729251

might as well have a go

>> No.65729272


>> No.65729274

no. no

>> No.65729283

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

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

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]

You all know I love showing off

>> No.65729382

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

spare me anus

>> No.65729448

>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

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]

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

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

>> No.65729568

holy shit stop

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

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

why not use a union?

>> No.65729674

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

thats not what error handling is about, dimwit

>> No.65729762

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

>> No.65729765

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

>> No.65729790

I know retard
>what are jokes

>> No.65729794

let's try

>> No.65729797

your jokes are shit

>> No.65729804

yeah aside from the syntax errors and lack of returns.

>> No.65729836

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

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

>> No.65729923

No one will actually give a shit.

>> No.65729935

There is no C-inspired language that is clean.

>> No.65729940

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

in javascript?

>> No.65729943


>> No.65729948

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

>> No.65729955

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

>> No.65729959

Define clean.

>> No.65729968

i don't use D myself, but can't the gc be disabled?
>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

>>65729906's definition of clean

>> No.65729974

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

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

>> No.65729982

So why did you bother answering?

>> No.65729992

Why did you bother responding to my answer?

>> No.65730003

>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

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

>> No.65730028

>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

Nice blog (©:

>> No.65730045

>not combining them and making SMT a reality
pleb desu

>> No.65730055

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

>> No.65730056

garbage collection did nothing wrong

>> No.65730065


>> No.65730067

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

>> No.65730098

Lisp is the most powerful programming language.

>> No.65730099


>> No.65730104


>> No.65730114


>> No.65730119

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

>> No.65730126


>> No.65730149

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

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

>> No.65730157

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

>> No.65730173

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

>> No.65730208

here we go

>> No.65730211

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

portacle, if it works anymore

>> No.65730223

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

>> No.65730228

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

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

isn't python the hot thing in that field?

>> No.65730361

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.
JavaScript? Interesting suggestion.

>> No.65730372

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

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

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

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

>> No.65730532

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

>> No.65730557

on reddit

>> No.65730559 [DELETED] 

Probably adding image filters LOL

>> No.65730635

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

>> No.65730637 [DELETED] 

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

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

>> No.65730705

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

framework for?

>> No.65730785

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

why the cracked version?

>> No.65730836

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

how did you manage to age back 4 years

>> No.65730894

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

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

>> No.65730924

find an exact solution

>> No.65730967

So are a, b, and c imaginary then?

>> No.65731026

>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

>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

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

>> No.65731086

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

>> No.65731098


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

>> No.65731113

oh ho ho

>> No.65731123

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

>> No.65731127

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

na das haskal mane

>> No.65731155

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

>> No.65731169

very good analysis tbhask

>> No.65731190

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

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

>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

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

>> No.65731420

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('Iterated over everything')

Iterated over everything

>> No.65731469

>he uses python

>> No.65731497

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

>> No.65731499

>he doesn't use python

lmao @ ur life

>> No.65731570

yes, there's a windows C compiler

>> No.65731603

>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

Here for IRC:

>> No.65731614

FYI IRC chan isn't dead.

>> No.65731626

>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

are you a lisper?

>> No.65731690

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

int main(int argc, char const *argv[])

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

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

return 0;


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


>> No.65731768

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

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

>Randomly generate 1000 unique numbers ranging from 0 to 1000

(shuffle (range 1000))

>> No.65731841

big iron
big money

>> No.65731910

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

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

anything involving a database.

>> No.65732131

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

>> No.65732136

>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

>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

Yes lets create the earth in 7 days on a whim

>> No.65732193

What does this do?

>> No.65732201

This particular snippet? Nothing at all.

>> No.65732206

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

>> No.65732236

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;

tongue_my_anus: real;


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

Another thing that annoys me:

program FuckingSubranges;

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

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

writeln('Enter a positive integer smaller than 10:');
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:');
writeln(day_subrange, ' = sat: ', day_subrange = sat);
{Compiler error.}

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


>> No.65732326

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

>> No.65732400

Also comments are totally fucked in Pascal.

program Comments;

{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!');

>> No.65732417

>print 'foo', doesn't

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

jesus fuck

>> No.65732729

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

sorry, *keyboards, not keywords

>> No.65732763

jesus fuck

>> No.65732795

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

>> No.65732810

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

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:
>Any factor whose type is S, where S is a subrange of T, shall be treated as if it were of type T.

>> No.65733007

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

Fashion is fierce

>> No.65733523

you need to go back

>> No.65733748

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

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

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

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

>> No.65733957

Which one?

>> No.65733964

Autism is why.

>> No.65734073

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

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

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)
Password [?]Password used for file deletion.