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

Maintenance is complete! We got more disk space.
Become a Patron!

/g/ - Technology


View post   

[ Toggle deleted replies ]
File: 44 KB, 500x346, tumblr_lxtyywcGxo1r7w65no1_500.gif [View same] [iqdb] [saucenao] [google] [report]
62651371 No.62651371 [Reply] [Original] [archived.moe] [rbt]

What are you working on, /g/?

Old thread: >>62644176

>> No.62651397
File: 184 KB, 808x628, Screenshot_2017-09-27_20-57-55.png [View same] [iqdb] [saucenao] [google] [report]
62651397

>220 lines of code just to simulate water
I haven't even gotten to transforms yet.

>> No.62651406
File: 8 KB, 220x266, vriska_gif.gif [View same] [iqdb] [saucenao] [google] [report]
62651406

A simple web "app" for personal use.

>> No.62651421

>>62651397
how about you do it properly
1. make a plane
2. apply specular map
3. transform vertices using perlin noise

>> No.62651425

>>62651371
>>62651406
wtf is this /co/ tumblr trash

>> No.62651434

>>62651406
containment thread >>>/g/wdg

>> No.62651439

>>62651397
fuck opengl, though

>> No.62651454

Can one become a coder being a brainlet(IQ < 110)?

>> No.62651478

>>62651454
no but you could try becoming a nigger

>> No.62651479

>>62651406
>>>/g/wdg

>> No.62651494

>>62651454
no but you could try becoming a programmer

>> No.62651527
File: 239 KB, 696x720, 1494600120912.png [View same] [iqdb] [saucenao] [google] [report]
62651527

>>62651421
t. someone who hasn't touched graphics since 98'

>> No.62651617

ok this is driving me nuts, so I'm coming to you guys to help.

I'm having problems reading UDP packets using the c# .net framework. I'm working with someone elses code, and it appears they didn't create any method for reading through queued packets.

I've tried a whole bunch of things that didn't work, so I'm throwing it to the hive mind.

here's the library code:
public byte[] RecvPacketUDP(int _listenPort)
{
UdpClient listener;
try
{
listener = new UdpClient(_listenPort);
listener.BeginReceive(new System.AsyncCallback(OnUdpData), listener);
}
catch (System.Exception e)
{
Debug.Log(e);
}
return receiveByteArray;
}


void OnUdpData(System.IAsyncResult _result)
{
UdpClient listener = _result.AsyncState as UdpClient;
receiveByteArray = listener.EndReceive(_result, ref groupEP);
listener.Close();
}


And I'm checking for the packets with this:
byte[] m_recvData = m_netRecv.RecvPacketUDP(m_port);

The main problem I'm running into is that the listener client doesn't need to want to use Poll();

>> No.62651649
File: 8 KB, 216x233, 1493690821459.jpg [View same] [iqdb] [saucenao] [google] [report]
62651649

>writing ransomware
>accidentally infect my own computer
>have to pay myself 2 bitcoin to get access back

>> No.62651653

>>62651649
>not having a backdoor

lmaoing @ ur life

>> No.62651669

>>62651649
>writing ransomware
>test on his own machine
>no safeguard
freaking deserve it anon

>> No.62651698

>>62651527
so I'm going to be the one to ask this time

what does the t. stand for in these?

>> No.62651699

mark lutz – python (2013)

>> No.62651713
File: 68 KB, 200x200, penn-jillette.png [View same] [iqdb] [saucenao] [google] [report]
62651713

>portfolio has video games in it

>> No.62651735
File: 772 KB, 4160x5000, 1488665257885.jpg [View same] [iqdb] [saucenao] [google] [report]
62651735

>>62651649
>writing AI gf
>teach her how to program
>she writes her own AI bf
>leaves me for chad.exe

>> No.62651738

>>62651698
gentoo

>> No.62651799

>>62651698
Its a finish thing originating from yliluata or some other finish Chan.

Short for "terveisin" and translates to something like "regards". Basically it's what finish people write at the end if a letter.

t. meme pro

>> No.62651885

>>62651527
t. someone who thinks using python with a gl library is 'modern'

>> No.62651933

heh whitebois how it feel knowing computers was invented by a BLACK MAN while yall asses was still living in caves?

>> No.62651945

>>62651933
are you saying kangz wuz the original wageslave and whitey wuz NEET n sheet?

>> No.62651969

Debugging coworkers

>> No.62651990

>>62651933
nibbas need them calculators to add up all their melon&nugg money

>> No.62651994
File: 7 KB, 397x150, category theory.png [View same] [iqdb] [saucenao] [google] [report]
62651994

>>62651969
is a coworker someone who never works

>> No.62652008
File: 495 KB, 953x1282, 1505378232005.png [View same] [iqdb] [saucenao] [google] [report]
62652008

>join irc
>channel is either dead or offtopic
why do people use irc?

>> No.62652050

>>62652008
go to be grandpa you're drunk

>> No.62652101

>>62652008
what are you using irc for?
what are the alternatives?
sometimes i use it for file sharing.
once upon a time i would seek help there.

>> No.62652133

thoughts?
[method] [path] [version]
[headers]

[content]


[version] [status]
[headers]

[content]

>> No.62652137

>>62652101
>what are you using irc for?
I thought people posted programming problems / discussions about languages and I could learn something from that. To get help with emacs config etc.
>what are the alternatives?
ShitOverflow I suppose.

>> No.62652155

>>62652137
ever head of a manpage nibba

>> No.62652241

>>62652155
>man ls
>answers all my questions
thanks

>> No.62652300

>>62651371
the end of programming as you know it

>inb4 muh golden age of lisp-like substances

>> No.62652352

>>62651434
>>62651479
It's just a tool for non-web dev stuff.

>> No.62652472

>>62651371
Todo task manager thing. Just realised I basically wrote half of a calendar application.

>> No.62652477

>>62651799
thanks!

>> No.62652520

what I want
Control^ x;
if(x->GetType()==System::Button)

what I have
Control^ x;
Button^ y;
if(x.GetType()==y.GetType())

its so minuscule but creating a variable just to check the type if infuriating me. Any suggestions.

>> No.62652577

>>62652520
What language?

>> No.62652597
File: 145 KB, 1200x974, 1493230074882.jpg [View same] [iqdb] [saucenao] [google] [report]
62652597

>start repl
>go make myself a coffee or two
>repl starts

Other than that I really enjoy Clojure atm. Did anybody have one of those mystical moments promised by lisp?
I like the way it makes me think more about what I'm going to write, and that it pulls me out of my comfort zone, coming from Java.
Any lispers want to share their wisdom? Any stuff I should read twice about? What makes it so great?

>> No.62652608

>>62652597
Clojure isn't a real lisp
Neither is C++ommon """ Lisp"""

>> No.62652655
File: 36 KB, 268x237, 1470792067398.png [View same] [iqdb] [saucenao] [google] [report]
62652655

Employed Haskell programmer here

>> No.62652684

>>62652520
typeof(Button)

>> No.62652686

>>62652577
C++

>> No.62652698
File: 73 KB, 189x189, doc250185730_355890431.gif [View same] [iqdb] [saucenao] [google] [report]
62652698

>>62652655
plz stop

>> No.62652709
File: 103 KB, 270x320, 1484791574539.png [View same] [iqdb] [saucenao] [google] [report]
62652709

Employed Rust programmer here

>> No.62652755

>>62652686
C++ doesn't have that caret shit, isn't this Microsoft's CLR version?

>> No.62652756

>>62652684
thats for c#, but I dont think that would work. Typeof works pretty much the same as Get type where it takes an object.

>> No.62652762

>>62652755
Yes, it's a pointer to garbage-collectable objects

>> No.62652779

>>62652756
wait I think it does work for typeof but not gettype.
since this is microsofts c# example
Type t = typeof(ExampleClass);
// Alternatively, you could use
// ExampleClass obj = new ExampleClass();
// Type t = obj.GetType();

Im guessing theres no way around it.

>> No.62652789

>>62652755
Ye...yes

>> No.62652917
File: 228 KB, 1600x1200, 239491238123.jpg [View same] [iqdb] [saucenao] [google] [report]
62652917

Why do strings have to be null terminated? Aren't they simply arrays of chars? Why are they special in this regard?

>> No.62652921

>>62652917
That's only a problem in C

>> No.62652925

>>62652472
share it to us
>>62652

>> No.62652936

>>62652917
How do you know when the array ends? Strings are of different lengths.

Either you can mark the end of the string with a special value or you can prefix the string with a length. C chose the stupid option.

>> No.62652956

>>62652917
>Aren't they simply arrays of chars?
You serious mate. How do add a char array to another char array like you would a string.

>> No.62652972

>>62652936
But the stupid option would be to have a fixed block at the start dedicated to the length, because it would limit the length of the string, unless again you have a special termination character for the length of the string.

>> No.62652989

>>62652972
size_t was invented for this reason.

>> No.62652998

>>62652608
>Neither is C++ommon """ Lisp"""
Common lisp is the only real lisp, dumbfag.

>> No.62653058
File: 220 KB, 1368x998, Screenshot_20170928-113551.jpg [View same] [iqdb] [saucenao] [google] [report]
62653058

Apparently I have a fucking UML module at uni this year. It's exactly as it sounds. Pic related is an unironic slide from the introductory lecture.

Some quotes from the professor:
>for a similar program, C or C++ might be, I don't know, 5 times slower than Iava, because you're directly dealing with uhh, pointers and stuff.
>in Java, to iterate over a collection, you have to write a for loop with int i = 0 etc. That's more error prone than e.g. C#'s foreach construct - for instance, your word processor might capitalise one of the 'i's, and you won't notice what the error is
>my research is in agile integration. So basically I'll be teaching you the state of the art here, haha

>> No.62653109

friendly reminder that if you ever use a built-in data type in your code, you should kys

a temperature is not a double, it's a Temperature object

>> No.62653115

>>62653109
A temperature is an int

>> No.62653121

>>62653109
would love to do that if strong typedefs were a thing

>> No.62653125

>>62653058
But UML predates most of those.

Also, nobody strictly adheres to UML unless your management is retarded and likes to waste time and resources on useless shit. At best a subset will be used for brainstorming.

>> No.62653126

>>62653058
Why is everyone so scared of for (int i = 0; loops these days

jsfags literally always jump on the fence with autistic screeching "FUCK OFF USE MAP RETARD"

>> No.62653133

>>62653115
Everything is an int if you are perfectly modeling the universe at the quantum level

>> No.62653137

>>62653126
it's more expressive

>> No.62653155

>>62653126
Because all the kids these days just used range-for loops

>> No.62653156
File: 53 KB, 603x324, 1506021316885.jpg [View same] [iqdb] [saucenao] [google] [report]
62653156

>>62653109
>make a MysteryObject class
>make 100 constructors for all the types i need
>put all functions in there
perfect

>> No.62653192

>>62653109
I represent a rectangle as a float[4]

>> No.62653214

>>62653126
It's like everyone is trying to be more "functional" all the time

Haskellfags were right

>> No.62653225

>>62653109
>not implementing your Temperature class as a container of Fahrenheits
>not counting how many Fahrenheits you're currently storing when asked for the temperature

>> No.62653250

>>62653109
>>62653225
Jesus christ, this is literally how OOPfags see the world

>> No.62653273

>>62653250
This is how you should do it in any paradigm.

>> No.62653288

>>62653058

Fuck I hate UML. I mean I get that it's an effective way of handing pajeets a spec, but shit I did a class each of my three years in my degree on the topic.

I really liked this blog..

http://fsharpforfunandprofit.com/posts/no-uml-diagrams/

>> No.62653306

>>62653288
https://archive.eiffel.com/doc/manuals/technology/bmarticles/uml/page.html

>> No.62653320

http://ce.sharif.edu/courses/95-96/1/ce418-2/resources/root/Books-OtherMaterials/UMLDistilled.pdf

Read that and you're done with UML. There's absolutely no reason to go deeper than that, unless you're scamming people into paying you to teach them UML.

>> No.62653344

>>62653306
I actually studied Eiffel in my degree too..

>> No.62653353

What should I use to generate C code docs?
I want something like Sphinx for Python and I hate Doxygen.

>> No.62653393

>>62653225
900 IQ Pajeet

>> No.62653434
File: 47 KB, 500x500, 1506518174745.jpg [View same] [iqdb] [saucenao] [google] [report]
62653434

typedef struct SelfReferential {
int i;
SelfReferential* sr;
} SelfReferential;

>> No.62653487

>>62652972
But you can have a fixed block at the start dedicated to the length of the string length section length, which would make maximum length of the string to be equal to (256^255)-1 bytes.

>> No.62653520

>>62653487
Way to waste space lad

>> No.62653526

>>62653434
Now dereference that SelfReferential* through a pointer to a SelfReferential

>> No.62653538

>>62653487
Spending one word on a size_t is preferential to a O(n) strlen

>> No.62653558

git is HARD

>> No.62653589

>>62653558
Only if you've used SVN before

>> No.62653609

>>62653526
*(sp->sr)


Okay?

>> No.62653678
File: 140 KB, 960x540, 1472125253470.jpg [View same] [iqdb] [saucenao] [google] [report]
62653678

What music do you guys listen to while programming?

I'm looking for something new.

>> No.62653688

I was checking the standard formatters in the java.util.logging library and it turns out the SimpleFormatter (emphasis on "Simple") requires patterns like this:

%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %2$s %5$s%6$s%n

Like, what the actual fuck, Java

>> No.62653694

>>62653678
Usually comfy retro video game music

>> No.62653701

>>62653688
b-but muh byte code

>> No.62653708

>>62652917
it's useful for stuff like actually knowing where it ends or artificially splitting it up by inserting new null terminators in the middle if need be
also, if this bothers you that much just don't work in C?

>> No.62653724

Do unions actually have any realistic use cases in normal programming?

>> No.62653726

>>62653558
not at all

>> No.62653736

>>62653678
gachi

>> No.62653741

>>62653678
Go to /mu/'s share threads and download what you think is interesting.
Start a last.fm and the more you listen to the more recs you get there.

>> No.62653764

>>62653724
no. unions are shit.

>> No.62653772

>>62653724
All the time, along with an enum tag if you're using a shitlang like C.

>> No.62653791

>>62653678
https://www.youtube.com/watch?v=wN_xq-abN9Q
Makes ya feel

>> No.62653798

>>62652008
Depends on the channel. D IRC is pretty comfy

>> No.62653804

>>62652709
bakari

>> No.62653817

Good day, gentoomen. Today I had a job interview and had to solve a very simple Python exercise. Here's the code:
for x in range(1,51):
if x % 3 == 0:
print("This digit divides by 3")
elif x % 5 == 0:
print("This digit divides by 5")
elif x % 3 == 0 and x % 5 == 0:
print("This digit divides by 3 and 5")
else:
print(x)

However, the last "if" option doesn't work. The program starts but doesn't display results as "This digit divides by 3 and 5". Can you tell me why?

>> No.62653820

>>62653817
>he's fucking up fizzbuzz

Just neck yourself mate

>> No.62653821

>>62653817
It needs to come first.

>> No.62653824

>>62653817
Don't call us, we'll call you.

>> No.62653848

>>62653817
ifs work correctly, but your placement logic is random
it checks for 3, if yes it prints and GOES to NEXT I
obviously if it's divisible by both 3 and 5 it'll just print 1 of the prior

but this made me question your "interview" claim buddy

>> No.62653859

>>62653817
Is this bait?

>> No.62653885

>>62653859
no, he just started learning and was too embarassed to ask directly so he fabricated a lie

>> No.62653906

>>62653885
I applied for a simple position and claimed to know “some Python”. So at the end of the interview they just gave me this shit.

>> No.62653908

i want all pythonlets to go and stay go

>> No.62653920

>>62653724
only tagged enums

>> No.62653925

Will Qt ever stop being dependent on ancient C++ Moc hacks?

>> No.62653936

>>62653906
lmao wtf

>> No.62653952

>>62653908
dude stop derailing, every language has its issues including the people who use it

>> No.62653956

>>62653908
Salty because you got outsourced by a Python user?

>> No.62653967

>>62653817
you gotta put that last statement first, because if it's divisible by 3 the first thing is gonna catch it, and if its divisible by 5, the second thing is gonna catch it.

>> No.62653984

>>62653058
I'm sure this is a ragebait post
But people who teach these things have to convince themselves they're doing something useful somehow
Which usually manifests as disdain for what their peers at doing
Same reason you get so much c++ hate in these threads

>> No.62654042

>>62653984
>I'm sure this is a ragebait post
I fucking wish
https://www.kcl.ac.uk/nms/depts/informatics/study/current/Handbook/progs/modules/5CCS2OSD.aspx

A couple more quotes:
>I really wouldn't want to be a programmer in the 60s-70s, it sounds horrible
>There's no argument that Java code is easier to write than C or C++

>> No.62654088

>>62653824
underrated

>> No.62654229

>>62651617

still having problems, help is appreciated

>> No.62654297

>>62651371
division in VHDL, the end goal is to calculate RPM from a signal source

>> No.62654465

What languages have first class types?

>> No.62654467

rip richard stallman

f

>> No.62654490
File: 77 KB, 1716x612, Capture.png [View same] [iqdb] [saucenao] [google] [report]
62654490

>>62654465

>> No.62654502

>>62654490
That list seems to be incomplete.

>> No.62654535

>>62654502
what's it missing?

>> No.62654579

have an ingrown hair friends

>> No.62654584

>interview today
>software engineer
>let's talk about design patterns. do you know what they are?
>um principes such as DRY or KISS?
>no like [word I never head before] [another word I never heard before], and singleton
>oh I haven't used those much

did i fail lmao fucking OOP. This was the 4th on-site interview, and I did ok in the coding ones, and I had a coding test online before where I also did ok. But I never learned these OOP concepts I even had a cheatsheet opened with those UML diagrams that I think were explaining this shit, but I never got around reading it

How bad is it? The interviewer said right away oh don't worry about it. But you know...

>> No.62654628

>>62654584
Depends on the interviewer. Most people actually don't care about design patterns that much, despite what /dpt/ will have you believe. However, it's good to understand and recognize when something is acting as a singleton or why you would use a factory pattern, because some of these design patterns naturally occur in most non-trivial software codebases.

>> No.62654692

>>62654628
I'm looking over them now http://www.mcdonaldland.info/files/designpatterns/designpatternscard.pdf ... I never had those mentioned in the SE class during my CS degree. Looks like a rather huge whole bunch of stuff

>> No.62654718

>>62654692
Singlton, Observer, Decorator, and Factory are all pretty common. The PDF you posted has lots of rare ones and a few common ones sprinkled in.

>> No.62654726
File: 572 KB, 600x580, 1478388350910.png [View same] [iqdb] [saucenao] [google] [report]
62654726

>C++ is a productivity enhancement tool.

>> No.62654744

>>62654726
I'm almost hoping this shitpost sparks actual productive conversation to spite you.

>> No.62654750

>>62654718
>Singlton, Observer, Decorator, and Factory are all pretty common.
I think these besides Decorator may actually be the ones the interviewer mentioned. I'll study up on them thanks anon

>> No.62654820

>>62654744
My company recently switched from x86 assembly to C++ and we've increased our productivity by 3.7%.

Mr. Noseberg was ecstatic.

>> No.62654862

>>62654584
this patterns are a meme, they are for java monkeys that can't design software by themself, you are not like that, senpai, right?

>> No.62654880

>>62651698
>>62651799
>>62652477
it stands for "tom"
as in t. hanks

>> No.62654963

Algorithm Analysis question: I'm reading CLRS, and am trying to wrap my head around asymptotic notation. In one example, to prove that the function 1/2n2- 3n = Θ(n2), they begin by dividing both sides of the inequality by n2, and in another to prove that 6n3 != Θ(n2) , they begin by dividing the inequality by n2.

Is it always the case to begin this analysis by dividing by the leading highest-order term?

>> No.62654976

>>62654963
Fuck, 4chan deleted my symbols.

functions are 1/2n^2, Θ(n^2), and 6n^3

>> No.62654990
File: 80 KB, 1280x720, mpv-shot0015.jpg [View same] [iqdb] [saucenao] [google] [report]
62654990

Someone give me the motivation to get off my ass and start programming.

>> No.62655020

>>62654990
If you get off your ass and start programming, someday you'll be rich and then you can spend all of your money on partying with hot Korean sluts

>> No.62655077

>>62655020
>and then you can spend all of your money on partying with hot Korean sluts
The first time a post on 4chan actually motivated me, holy shit. I just remembered that prostitutes are legal where I live! Based, I'll get to work immediately

>> No.62655086

>>62654820
kek

>> No.62655112

Is it valid to use a function pointer like this?
struct Foo;
void fooFunction(Foo *foo);

void (*genericFunction)(void *data) = (void(*)(void*)) &fooFunction;

struct Foo foo;
(*genericFunction)(&foo);

>> No.62655149

i’m in computer programming II for my high school class and i’m so shit i don’t even know how to manipulate arrays. does anybody have any websites that can help me out

>> No.62655157

>>62655149
better be your senior year.

>> No.62655169

>>62655149
stack overflow is your friend. search your problem, and start from there.

>> No.62655258

Am I wrong in thinking that Big-O is worst case performance, Omega is best case, and if f(n) = Θ(n), then f(n) is in both O(n) and Ω(n) (i.e: best and worst case are the same)?

>> No.62655341

>>62655157
yea dw mall-cop im 18

>>62655169
ok ty. rn im trying to code a program that takes input from users like names, and uses the names with numbers (grades) then finds the average. my logic is fucking retarded but it works and i always get low grades on my projects. how i post the code like other anons above me

>> No.62655363

>>62655258
right

>> No.62655364

>>62655258
Yes. Big-O is an upper bound, big-omega a lower bound, and big-theta corresponds exactly.

You can measure best or worst or average performance, but those have nothing to do with the Big-O etc. notations - other than the fact that, if, e.g., the worst cast is in O(n), then the best and average cases will also be O(n) since O() is only an upper bound.

>> No.62655616

>looking up videos on math/programming
>this one looks good
>immediately hear indian accent

Why is it that only pajeets teach CS? We can't possibly be teaching people well that way

>> No.62655674

>>62655616
theres 10 trillion pajeets who'd rather write shitty code than attempt to fix their literal shithole of a country.

>> No.62655809

>>62645553
>See http://hi.cs.waseda.ac.jp/~iizuka/projects/completion/en/
Damn, that's amazing.

Actually, that's fucking unbelievably good. I wonder how much they generated faces differ from the actual faces

>> No.62655957

>>62655364
Maybe I'm misunderstanding the difference between best and worst case performance, but couldn't you say that a function f(n) = 5n^2 + 3 is O(n^3) since, for the formal definition, there are constants for which f(n) < c * n^3?

>> No.62655963

>>62655957
Yes

>> No.62655999

>>62655963
So the worst case performance is going to be the smallest order g(n) where f(n) is in O(g(n))

i.e: n^2 is in O(n^3), and n^2 is in O(n^2), but n^2 is not in O(n) and so the worst case is n^2 and not n^3?

>> No.62656079

>>62655809
This is like magic.

>> No.62656215
File: 30 KB, 593x425, laptop.jpg [View same] [iqdb] [saucenao] [google] [report]
62656215

Ive made a basic keylogger

It works fine on my desktop however when i run it on my laptop all the logged ascii characters are fucked as seen in pic

Modules and python version number are the same

>> No.62656226

>>62656215
>Keylogger in Python

>> No.62656241
File: 34 KB, 630x380, 22008316.jpg [View same] [iqdb] [saucenao] [google] [report]
62656241

Is there any free data hosting server? For keeping data.

I am making a cross platform reminder app (POSIX, Android) but they need to share common database for a user. But the problem is that I don't want to pay money.

>> No.62656256

>>62656226
yes

>> No.62656262

>>62656215
Different cpu. The byte size isn't the same on the laptop probably intel cpu.

that's why.

Change your code so that it gets the local input in binary and use a library to transform that into ascii crossplatform. then it will work on every system and cpu

>> No.62656270

More algo question:

I've calculated the run time for the follow function


f(n){
r = 0 1
for(i = 0 to n) n
for(j = 1 to i) n(n+1)/2
for(k = j to i + j) n(n+1)/2
r++ 1
return r 1
}


I figured that for(j = 0 to i) would be the sum of the first n loops of i (0 + 1 + 2 + ... + n) which is of course n(n+1)/2

then I figured for(k = j to i + j) would be a constant width; for example, if i is 10, then for each loop through j, the k loop will be
1 to 11, 2 to 12, 3 to 13, etc. meaning that it will run i times for every j loop.

I figured that the run time is

1 + n + n(n+1)/2 + n(n+1)/2 + 1 + 1

But I feel like this is incorrect

>> No.62656366

>>62655809
where can i use this? how do i download it? this is fucking sweet

>> No.62656376

nogenerics.info

>> No.62656403

>Model the Human using the code.
>Show you a represent human using a code

Ok boys, what would you do if you got task like this?
What kind of stupid shit is this?

>> No.62656410
File: 77 KB, 677x463, ignore_sepples.jpg [View same] [iqdb] [saucenao] [google] [report]
62656410

How does one dissuade idiots from buying into the meme that "real programmers" have to master C++? You can't just ignore it, because these "people" are going to spend the next 10 years trying to do so. That's 10 years they could've spent learning 10 other languages and getting some actual perspective. Instead, you get loads of people who know nothing but C++, whose entire career is based on this C++ "expertise", with a very high personal stake (both financial and psychological) in perpetuating the same meme that got them trapped in C++ hell to begin with. Should the government intervene? Should C++ simply be outlawed?

>> No.62656416

>>62656403
Is this like intro to java? Just make a class, with fields like height, weight, hair color, skin color, eye color, etc.

>> No.62656426

>>62656241
Host your own server.

>> No.62656434

>>62656410
>trying to convince people of anything
I thank our lord and savior every day for sepples. It's a great baka trap so they stay out of the actual good languages i like.

>> No.62656443
File: 29 KB, 500x359, worst girl.jpg [View same] [iqdb] [saucenao] [google] [report]
62656443

>>62651371
can /g/ give me an idea for my AI app? its supposed to help people and shit. Its for a
>hackathon

>> No.62656446

>>62656416
this is task for a job, im not even joking
Now i think maybe they wanted me to literary make human, like parts and shit using pattern
this is just stupid

>> No.62656460

>>62656446
Enjoy writing thousands of attributes, faggot

>> No.62656478

>>62656460
i have 19hours to finish it

>> No.62656485

>>62656410
Once you know C++_ you don't need to know anything else.

>> No.62656498 [DELETED] 
File: 76 KB, 1325x597, .png [View same] [iqdb] [saucenao] [google] [report]
62656498

strange bug

session.evaluate('document.querySelector("#txtsbj").value = 4')
session.evaluate('''document.querySelector('["name="txtbdy"]').value = 4''')


One works in my bot and the other doesn't. But the weird thing is both work in the console so they should do exactly the same thing

>> No.62656512

>>62656498
oh wow I'm an idiot

>> No.62656667

>>62656270
Anyone? This prblem is really fucking with me

>> No.62656705

mobile gpus are niggerific

they want you to put constants in uniform variables instead of in the shader source code

you would think the driver would be able to put them in unused uniform registers on its own if it so preferred

>> No.62656739

>>62656705
Constants are supposed to go in uniforms, otherwise they would be attribute data that gets stored in vram.

>> No.62656747
File: 91 KB, 419x767, smash_bros.jpg [View same] [iqdb] [saucenao] [google] [report]
62656747

My university is recommending using the java IDE eclipse, but said you can use whichever one you want. Is eclipse good or is there a different IDE that's better?

>> No.62656749
File: 6 KB, 139x150, tfw-this-shit-again.jpg [View same] [iqdb] [saucenao] [google] [report]
62656749

>>62656485
>Once you know C++_ you don't need to know anything else.
Thanks for illustrating my point.

>> No.62656764

>>62656747
you're a beginner, use a text editor and a makefile

>> No.62656787

>>62656764
>makefile
>java

>> No.62656793

>>62653156
Who is that?

>> No.62656794

>>62656764
>make file
>beginner
wut
>>62656747
but if you get acquaitained with makefile early on it will (probably) benefit your future career

>> No.62656807

>>62656787
yes?
does javac not allow commandline flags?

>> No.62656819

>>62656794
also with java you should use ant

>> No.62656824

>>62656807
please. javafags aren't stuck in the 70's

>> No.62656834

>>62656824
how do you compile projects in java?

>> No.62656869

>>62654297
>division in VHDL
eheheheh, hope you've done your reading on iterative ALU's

>> No.62656896

>>62656834
http://pages.cs.wisc.edu/~cs302/labs/EclipseTutorial/Step_04.html

>> No.62656900

>>62654297
>division
Fixed divisor?

>> No.62656911

> try different LIMS system
> they all suck for my specific task

And here I go again...if you want software done right, you have to do it yourself.

>> No.62656935

>>62656747
what uni?

>> No.62656942

>>62656911
it all begin with this mentality. did you see how well it end?

>> No.62656959

Why does this give me linker errors?
template <int n>
struct Boxes
{
static int box;
};

int main()
{

Boxes<1>::box = 0;
Boxes<2>::box = 2;
std::cout << Boxes<1>::box << Boxes<2>::box;
}

/tmp/ccpZTNA5.o: In function `main':
:(.text.startup+0xd): undefined reference to `Boxes<1>::box'
:(.text.startup+0x17): undefined reference to `Boxes<2>::box'
collect2: error: ld returned 1 exit status

It doesn't help much if I explicitly instantiate.
template <int n>
struct Boxes
{
static int box;
};
template int Boxes<1>::box;

int main()
{

Boxes<1>::box = 0;
Boxes<2>::box = 2;
std::cout << Boxes<1>::box << Boxes<2>::box;
}

In instantiation of 'int Boxes<1>::box':
24:24: required from here
24:24: error: explicit instantiation of 'Boxes<1>::box' but no definition available [-fpermissive]
In instantiation of 'int Boxes<1>::box':
24:24: required from here
24:24: error: explicit instantiation of 'Boxes<1>::box' but no definition available [-fpermissive]
In instantiation of 'int Boxes<1>::box':
24:24: required from here
24:24: error: explicit instantiation of 'Boxes<1>::box' but no definition available [-fpermissive]

>> No.62656965
File: 56 KB, 1276x720, 1484353696155.jpg [View same] [iqdb] [saucenao] [google] [report]
62656965

>>62656935
Why'd you wanna know?

>> No.62656971

Any you guys try the triplebyte quiz and programming challanges? They are supposed to hook you up with interviews if you pass.

I tried it and they emailed me saying they arent going through with my application any further. I pretty much expected this considering I dont really do any programming at all and had to do the programming challenges in python. I dont even know python.

The test wasnt really all that difficult. I passed 2/4 of the programming challenges without much programming skill and the multiple choice had a lot of questions about web application architecture and specific software that I'm not familiar with. But I'm sure a some people on /g/ could pass it.

>> No.62656975
File: 141 KB, 400x400, 12341354376.jpg [View same] [iqdb] [saucenao] [google] [report]
62656975

Why is C++ such a meme language but everyone always defends Java even though Java is the most pajeet copy-paste thinking=0 language ever?

>> No.62656991

>>62656975
C++ is a never ending nightmare, the true "fractal of bad design".
Java is just lame, you learn it and then it won't surprise you.

>> No.62657006

>>62656991
Honestly if you've worked in C++, java won't surprise you either. Maybe the neverending build systems will surprise you.

>> No.62657020

>>62656975
java follow the saying "enough monkey with typewirter will produce a shakepeare's work".
lower entry barrier, bring in the monkey, get working program, profit.

>> No.62657035

>>62656991
>>62657006

I somewhat agree with both of these
There are uses for C++, but it's probably designed worse than Java is.
Obviously the design for Java is based on false principles (OOP) but it's still better designed.

>> No.62657042

>>62656975
It seems like you think a language is better if it is less convenient.

>> No.62657044

>>62656965
>uni shooting.webm

>> No.62657051

>>62656965
is it oop norf?

>> No.62657104

Is codeblocks the only IDE that uses gcc/g++?

>> No.62657116

>>62657042
This is the way many fags on /g/ think. Seems like they dont understand language isnt all about just syntax but what you actually build with it.

Programming is filled with insecure douchebags the feel the need to constantly remind everyone that they are smarter than everyone else.

>> No.62657121
File: 30 KB, 400x400, 1501542282329.jpg [View same] [iqdb] [saucenao] [google] [report]
62657121

>>62657051
oh fuck.
You're in my class, ain't ya?

>> No.62657139

>>62656942

In the process my friend, in the process.

I have some code on a NAS but I can't get to it due to being abroad and having forgotten the URL >.<

It's been a long day and my brains fried so I guess I'll have to get the database layout tomorrow. If I can get my old code, I at least have a database layout for user logins etc.

>> No.62657207

>>62657104
no. Qtcreator uses it too

>> No.62657226

>>62657121
go get a room you 2.
freaking matchmaking on /g/

>> No.62657228

>>62656959
Don't you have to define it in global scope. I.e, template int Boxes<1>::box = 0; outside main

>> No.62657244

>>62656793
my boy bjarne stroustrup

>> No.62657249

>>62657226
I just want a qt trap friend anon.

>> No.62657250

Have any of you ever worked with TensorFlow's modelsaver? I'm trying to build an RNN that generates tweets character by character and I think I'm able to train it fine as the loss function drops to 0 pretty quickly, but I can't seem to load the trained values to use my model.

>> No.62657259

>female software engineers
https://softwareengineering.stackexchange.com/questions/358068/why-are-bit-masks-called-masks

>> No.62657285

>>62657035
It's not just the quality of design, it's the scale of it. Java is not only reasonably well designed (for what it is), it's also small and easy to learn. It's stable (the only major additions being Generics in 5 and functional stuff in 8) and is generally free of surprises.

C++ changes constantly and absorbs everything. It's a behemoth. Being poorly designed isn't as much of a problem compared to having so many pitfalls it's impossible to know them all.

>> No.62657298

>>62657249
>ywn be a cute trap because you gotta make for living

>> No.62657300

>>62657250

You should train it by only using @realDonaldTrump tweets.

>> No.62657301

>>62657285
>Java is not only reasonably well designed (for what it is), it's also small and easy to learn.
garbage comment

>> No.62657308

Scala shill reporting in.

>> No.62657311

>>62657301
call the GC quick

>> No.62657317

>>62657285
Java generics are void* based, right?

>> No.62657321

>>62657300
my dude how did you know what I was doing

>> No.62657326

>>62657308
a fast python program also reporting.

>> No.62657327

>>62657308
what is your report sonny?

>> No.62657335

>>62657250
Oh, wow, your NN has low bias? No way!

>> No.62657340

>>62657317
Pretty much.

>> No.62657342

>>62657301
it's true, why do you think C# shills boast about their features (really feature creep but without the performance advantages of C++), because java is much simpler

>> No.62657348

>>62657327
Decent weather with a chance of ClassCastException

>> No.62657376

>>62657340
they're more flexible then, you should see what you can do with generics in e.g. haskell because they aren't just templates

>> No.62657382

>>62657342
inb4 C# shills

>> No.62657385

>>62657335
I've tried it in multiple configurations, this current iteration does have low bias due to overfitting but not every one has. However, with every model I have been unable to load the trained values into the new session to test it's ability to generate text, so it's not like I could use my model anyway

>> No.62657412

>>62657342

Except that Java is trying to play catch-up on C# features, and is doing so poorly.

>> No.62657425

>>62657412
How so? The only thing that's really missing is reified generics and Java doesn't give a shit about that.

>> No.62657432

>>62656834

Maven or Gradle desu

>> No.62657441

>>62657412
ur a nigger
c# still runs like shit on linux

>> No.62657449
File: 27 KB, 500x499, 1484895573481.jpg [View same] [iqdb] [saucenao] [google] [report]
62657449

https://dzone.com/articles/java-8-optional-whats-point
>Optional<T>
>Since it's not a primitive it can be null
>So you have to check for null anyway
LMAOing @ Java devs

>> No.62657465

>>62657449
null by default was an awful idea

>> No.62657479

>>62657449
check the comments retard

>> No.62657492

>>62657479
I ain't enabling js for that

>> No.62657568

>>62657321

Telepathic powers acquired by frying my brain trying to acquire programming skills.
It only works when youre exhausted from thinking though.

>> No.62657608

fn dummy(x: &i32) {
println!("{}", x);
}

fn dummy2(x: i32) {
println!("{}", x);
}

fn main() {
let a = 123;
dummy(&&&&&&&&&&&&&&&&&&&&&&&a); // This is okay.

let b = &a;
dummy2(b); // This is an error.
}


Just what is wrong with Rust? I can only assume that taking a reference to a reference simply returns the original reference, but what is the point? Why is this allowed if it does nothing?

>> No.62657681

>>62657608
Because it's faster to compile when the compiler checks fewer things

>> No.62657722

I'm a student in a class studying bash. Could anyone help me with my code?

https://pastebin.com/hwU8i6zJ


i'm trying to have it take in multiple real numbers (with a decimal point) and output it. The fact that bash cannot handle decimals is confusing me.

>> No.62657744

>>62657681
>it's faster to compile
Even a C compiler from the 70s would notice that a reference to a reference to a reference to a reference to a reference to a reference to a reference to a reference to a reference to a reference to a reference to a reference to a reference to an int is not a reference to an int.

>> No.62657753

>>62657568
Could you telepathy one of the tensorflow engineers and tell me the secrets to the modelsaver?

>> No.62657770

>>62657753

Nope, used up my exhaustion. Might try the old approach of reading the documentation.

>> No.62657776

>>62657722
output the average actually so the sum/number of inputs.

>> No.62657834
File: 101 KB, 735x594, 89412783129371.jpg [View same] [iqdb] [saucenao] [google] [report]
62657834

Why is std::optional so good lads

>> No.62657852

>>62657834
Because it is late to the party:
https://en.wikipedia.org/wiki/Option_type

>> No.62657910

>>62652684
>>62652756
in C++ you want typeid, not typeof
typeid works for both types or expresions
you must include <typeinfo> or behavior is undefined

>> No.62657924

>>62657834
Maybe some 20 years down the road C++ will finally catch up with language features from 20 years ago. Anyone who says "C++ is powerful" without a hint of irony deserves state-mandated sterilization.

>> No.62657927

>>62657834
optional is just a special case of a variant

and variants are the solution to everything from null pointers to exceptions

>> No.62657955

>>62657722
Parse the string. Let's say, you multiply 15.3 and 0.25. You calculate the position of the decimal point in new number (1+2=3), and multiply actual numbers 153 and 25.
You get 3825. Now, when you are going to print the result, you put the decimal point before the 3rd number, making it into "3.825" string.

>> No.62658007

>solved coding exercise on codility, now I wanna make my solution faster
>0 represents cars driving east, 1 represent car driving west
>when two of these cross, that counts as a pair of cars passing each other.
>the algo counts the pairs of cars passing each other.
>how do I optimize this for speed? Python 3 btw


# A = [0, 1, 0, 1, 1, 1, 0] just as an example
def solution(A):
if len(A) == 1:
return 0
count = 0
for i in range(0, len(A)):
if A[i] == 0:
for j in range(i+1, len(A)):
if A[j] == 1:
count += 1
return count

>> No.62658020

>>62657955
this is very helpful. But will it accept user input with decimal points?

>> No.62658035
File: 11 KB, 326x326, ech.jpg [View same] [iqdb] [saucenao] [google] [report]
62658035

>>62657770
lol there basically is none. You can tell google had a pajeet write the official stuff because half the features are missing, it's not that helpful

>> No.62658050

>>62658020
>parse the string

>> No.62658067

>>62657924
are there any high-performance languages with a type system like haskell's?

>> No.62658069

>>62658050
how do i do that? Sorry i'm like really new.

>> No.62658073

>>62658007
I would tell you, but you greentexted everything for no reason

>> No.62658079

>>62658067
ATS has a better type system.

>> No.62658103

>>62658007
You could replace this
range(0, len(A))
With this
range(len(A))
It probably won't speed it up, but it will shorten it

>> No.62658158

>>62657441

Ok, communist.

>> No.62658196

>>62658007
def solution(A):
east = 0
count = 0
for i in range(0, len(A)):
if A[i] == 0:
east += 1
else:
count += east
return count

>> No.62658203

>>62658007
How about this?
def solution(A):
zero_count = 0
count = 0
n = len(A)
for i in range(n):
if A[i ]== 0:
count .-= zero_count
count += n-i+1
zero_count +=1
return count

>> No.62658210

>>62658073
lol ok, I just wanted to describe the problem in a succint manner

>>62658103
right, that shortens the code, but does nothing for speed

>> No.62658231

>>62656443
make a tool that helps you with a hobby

>> No.62658270

>>62657376
You can do everything you can do with void* generics with template generics. Well, maybe not in C++, but in theory, anyway. You just have to instantiate the template with an existential type.

>> No.62658281
File: 201 KB, 600x450, 349813783231.jpg [View same] [iqdb] [saucenao] [google] [report]
62658281

>>62656443
Make it rate how feminine a penis is

>> No.62658321

>>62658270
nah

>> No.62658327

>>62657259
yeah ok so?

>> No.62658331
File: 223 KB, 845x570, Screenshot 2017-09-28 at 2.20.36 PM.png [View same] [iqdb] [saucenao] [google] [report]
62658331

>>62658281

>> No.62658341

>>62658321
The only benefit of void* generics is higher rank polymorphism, which can be gained using an existential. Template based generics can be bounded, like in Rust (and whenever C++ gets concepts).

>> No.62658354

>>62658331
I would understand if this worked on pictures of 3D traps, but any artist can draw a female and claim it's a trap, so wouldn't that throw off this software?
It's just going to assume every excessively pink-haired character is a trap.

>> No.62658363

>>62658354
It looks for bulge

>> No.62658372

Why wouldn't one use exceptions in sepples? Read people say they are not used in high performance/real-time stuff, but at the same time, in other places that these days they don't have any additional cost over not using them.

>> No.62658376
File: 372 KB, 1280x720, draw a girl call it a boy.jpg [View same] [iqdb] [saucenao] [google] [report]
62658376

>>62658363
not all trap pics have bulges because artists are lazy

>> No.62658408

>>62658270
Templates are backwards, macro-based and everyone knows it.
Monomorphisation can optimise.

>> No.62658415

>>62658327
it's a dumb as bricks question

>"A bit mask is used to mask some bits of a bit field while exposing others:" I have never thought of it like this but it does make a lot of sense. Thank you for the explanation :)

>> No.62658424

>>62658372
Without exception specification they're invisible execution paths that make it difficult to reason about the control flow of your code.
Also, exception specification in C++ is broken.

>> No.62658432

>>62658408
By templates I just mean generics that are monomorphized.

>>62658372
Depends how they're implemented. DWARF exceptions are zero cost unless they're thrown. SJLJ exceptions have a slight overhead either way.

>> No.62658461

>>62658372
Slaves of sepples like obscure error messages.

>> No.62658542

>>62658372
I personally don't use exceptions in C++ because I never see it being used (also not in the standard library)

>> No.62658558

>>62658542
Doesn't the standard library throw when new fails?

>> No.62658559

>>62658432
Yes, but why would you not have that as a compiler step?
It's nonsense to have templates default and then have a ton of existentials

>> No.62658562

>>62658372
Monadic error handling is superior

>> No.62658573
File: 41 KB, 480x463, please let this suffering end.jpg [View same] [iqdb] [saucenao] [google] [report]
62658573

>>62651371
Hi all. I'm working on a program (using C) that will need to create and write to an indefinite amount of files. I want it to create the files in the format "000.jpg, 001.jpg, 002.jpg...." and so on. What is the proper way to accomplish this? Apparently something to do with sprintf, but i'm not connecting the dots here.

Disclaimer: Actually the assignment lets you know ahead of time that you'll need to write exactly 50 files, but supposing I didn't know that, how would I do it for an indefinite amount of files (within reason)? pic unrelated

>> No.62658592

>>62658372
I use exceptions but I never catch them
I use them to exit when something unexpected happens

>> No.62658595

>>62658542
It's part of the RAII ethos though, which in turn is bjarne's baby

>> No.62658596

>>62658562
In a language with syntax sugar like Rust it's easy to implement the same patterns as exceptions while also being much clearer about behavior.
It's just plain better.

>> No.62658608

>>62657744
Anon, the whole point of references is that they are implicitly dereferenced when used.
What you're doing there is (C syntax):
&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&a

which is &a.

>> No.62658611

>>62658372
outside of I/O and input processing you have no reason to use exceptions in the first place

>> No.62658616

>>62658595
just set a flag in your object if the constructor fails and test it with operator bool

>> No.62658625

>>62658559
I like having control over values vs. references.

>> No.62658640

>>62658573
Uhh
A for loop + 1 line of code?

>> No.62658663

>>62658625
use a pure language

>> No.62658679

>>62658663
For performance reasons.

>> No.62658683

>>62658573
What part do you need help with? creating files, or creating the file names? to pad with 3 zeroes, you use sprintf like

int fileNum = 22; //use 22 as an example
sprintf(buffer, "%03d.jpeg", fileNum);


and "buffer" will be "022.jpeg"

>> No.62658777

I'm writing a vm/emulator and need to write memory pages. Each page is 4kb (4096 bytes).

Lets say the process jumps from virtual memory location 0x10 to virtual memory location 0xFFFF (many pages past the first allocated memory page).

Should I allocate all intermediary pages in between, or does a page table only allocate the necessary memory? i.e: I've only used < 1 page of memory, but have addressed into 16 pages of memory. Should I allocate all 16 pages, or just one page and keep track of the virtual offset?

>> No.62658779

>>62658683
So something like this?
char filenames[50*5];
int num = 0;
for(int i = 0;i<10;i++) {
sprintf(filenames,"%03d.jpeg",num);
num++;
}

>> No.62658860

>>62658779

char filenames[50 * 5]


What you've created is not 50 strings of length 5, you've created one string of length 250. First of all, if you're going to pad each filename with 2 zeroes, then each filename needs to be of length 3 + 5 (3 for the number, 5 for the ".jpeg"). You can either make an array of strings, or you can save memory and just use ONE string of length 8, and write over it over and over.

char filename[8];
int num = 0;
for(int i = 0; i < 50; i++){
sprintf(filenames, "%03d.jpeg", num);
num++;

//put operations to create file here
}


then, every time that it loops around, it creates a new string with the appropriate filename, overwriting the old string, and then creates a new file with that filename

>> No.62658913

>>62658860
char filenames[50][7];
for(int i = 0;i<50;i++) {
sprintf(filenames[i],"%03d.jpeg",i);
printf("name: %s\n",filenames[i]);
}

Tank you for helping me out with my noob problems, anon. Is this correct? And then I guess i'd just access the arrays to create FILE "w" pointers?

>> No.62658961

>>62658913
Almost. Change that 7 to an 8

>> No.62658994

>>62656959
The way to use templated static members is this:

template <int n>
struct Boxes
{
static int box;
};

template<int n>
int Boxes<n>::box;

>> No.62658997

>>62658683
>>62658779
>>62658860
>>62658913
Why the fuck would you use C when it doesn't even have linear types, enjoy your use after free fags

>> No.62659026

>2017
>using a language without linear types
lmao dfags

>> No.62659027

>>62658961
why 8? My count is 1 char for the number, 1 char for the '.' and 4 for 'jpeg' and 1 for '\0', what am I missing?

>> No.62659043

>>62658997
Beause I want to learn C so I can git gud, and the course uses C.

>> No.62659057

>>62658994
Ayy, cheers.

>> No.62659074

>>62659027
the number is 3 characters. a number like 003 is 3 characters: 0 + 0 + 3. I did forget about the null character, so it should be 9 characters.

The string '009.jpeg' is actually an array of characters of the form:

{'0', '0', '9', '.', 'j', 'p', 'e', 'g', '\0'}

>> No.62659159
File: 111 KB, 1280x720, 1506550992222.jpg [View same] [iqdb] [saucenao] [google] [report]
62659159

When would you use a const ptr(not ptr to const)?

>> No.62659168
File: 652 KB, 720x473, police.png [View same] [iqdb] [saucenao] [google] [report]
62659168

Am working through an exercise in which I get a bunch of random java statements and have to use them all to print: "bang bang ba-bang" then ""
this is what I wrote:

class DrumKit {

boolean topHat = true;
boolean snare = true;

void playSnare() {
System.out.println("bang bang ba-bang");
}

void playTopHat() {
System.out.println("ding ding da-ding");
}
}

class DrumKitTestDrive {

public static void main(String[] args) {

Drumkit d = new DrumKit();

d.playSnare();
d.snare = false;

if (d.snare == true) {
d.playSnare();
}

d.playTopHat();
}
}


and this is the error I get:

Shuffle_2.java:19: error: cannot find symbol
Drumkit d = new DrumKit();
^
symbol: class Drumkit
location: class DrumKitTestDrive
1 error

halp.

>> No.62659179

>>62659168
baka

>> No.62659190

>>62659159
i love nene

>> No.62659191

>>62659159
When the location of the object pointed to doesn't change.

>> No.62659206

>>62659168
what the fox say

>> No.62659208

So, this might be a better place to ask.
I'm a electrical engineer, and i want to learn more about programming. Had a few CS related courses through college, but i'd never say i know how to program, only did small stuff in C, C++ and Python.
Now, i'm using my vacations to learn a bit more of python, is it a useful language outside of hobby programming and all?
I was reading the "Lear Python the Hard Way" book, but it brings about nothing to the table, what should i read next?

>> No.62659211

>>62659168
Uppercase the letter k.
Also >>62659179

>> No.62659257
File: 86 KB, 1024x575, meirl.jpg [View same] [iqdb] [saucenao] [google] [report]
62659257

>>62659179
>>62659211
fuck

>> No.62659258

>>62659159
const all the things

>> No.62659260

>>62659208
Automate the boring stuff with Python

>> No.62659355

>>62659257
If you want to go full brainlet, use an IDE like IntelliJ. It highlights typos.

>> No.62659370

>>62659260
Thanks, kind anon.

>> No.62659373

>>62659257
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/oxygen1

>> No.62659376

>>62659074
gotcha, ty again anon, you've been very much helpful.

>> No.62659389

neue tredd wenn?

>> No.62659395

https://www.ietf.org/rfc/rfc3454.txt
>this is what you have to do to make unicode actually usable
>encodinglets WILL defend this, along with the clusterfuck that is UTF-8, RTL text, and chained combining diacritics

>> No.62659470

>>62659395
Isn't Rob, no generics, Pike responsible for UTF-8?

>> No.62659524

>>62659470
It was the best he could do given what he had to work with, but it's like putting lipstick on a pig. You can't fix unicode by changing the representation, it's fundamentally broken.

>> No.62659561

>>62659524
Then what do you propose? SJIS? Big5?

>> No.62659605

LO AND BEHOLD
def compress[T](xs: Seq[T]) = {
def contains(xs: Seq[T], x: T): Boolean = if (xs.isEmpty) false else if (xs.head == x) true else contains(xs.tail, x)
def fn(xs: Seq[T], ys: Seq[T]): Seq[T] = if (xs.isEmpty) ys else fn(xs.tail, if (contains(ys, xs.head)) ys else xs.head +: ys)
fn(xs, Seq())
}

Also, I found out that point free notation is completely fucked in Scala.
Works:
Seq(1,2,3,2,1).distinct.map(_+1)

Does not work:
Seq(1,2,3,2,1) distinct map (_+1)

If only it had the (.) and ($) operator...

>> No.62659664

>>62659561
A character encoding that doesn't include insane shit. Big5 is a good principle, and UTF-14 would be a much more sane solution. If that's not okay, UTF-16 will do with the below improvements (substitute 14 for 16 and omit the first step)
>select the 127 most useful characters in unicode (presumably some combination of ascii, non-homoglyph cyrillic characters, and extra punctuation)
>prune unicode down to 2^14 code points
>remove RTL, graphical characters, homoglyphs, emoji, zero-width characters
>arabic can still be there, but it should be reversed by the input application and stored LTR

>> No.62659692

New thread:

>>62659687
>>62659687
>>62659687

>> No.62659718

>>62659664
>16384
But the CJK characters alone are more than that.

>> No.62660289

Just paid $20 for someone to make a logo for my project to motivate me lol

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