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

/dpt/ - Daily Programming Thread

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

Thread replies: 312
Thread images: 53

File: anime_programming_language.png (919KB, 960x1440px) Image search: [Google]
anime_programming_language.png
919KB, 960x1440px
What are you working on, /g/?

Old thread: >>59499557
>>
>>59505732
Somebody kill me
>>
Please do not use an anime image next time. Thanks.
>>
Thank you for using an anime picture.
>>
>>59505732
First for Visual Basic as waifu
>>
File: akari!!.jpg (83KB, 575x720px) Image search: [Google]
akari!!.jpg
83KB, 575x720px
Daily Programming Challenge!

In any language, write a program that will draw a circle of arbitrary size in the terminal!

Since most terminals fonts are not 1:1, your circle might look like this:
./circle 10
#####
# #
# #
# #
# #
# #
# #
# #
#####

You can cheat and make your circle look nicer by dividing your x values by 2.
./circle 10
#####
## ##
# #
## ##
#####
>>
I am currently working through the K&R book. I am confused by these two problems.

1-20
>Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a variable or a symbolic parameter?

1-21
>Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing. Use the same tab stops as for detab . When either a tab or a single blank would suffice to reach a tab stop, which should be given preference?

What is the difference between detab and entab? Sounds like to me both programs just want to ensure that there are the appropriate number of blanks in between the tabstops.
>>
>>59505732
how do you post inline code on 4chan?
>>
>>59505827
[ code ] [/ code ]
>>
can someone post that pic of the beta ass kid in the apple store with the god awful posture?
>>
>>59505816
From what I understand detab converts tabs to spaces, entab converts spaces to tab. Since there may not be an exactly equivalent amount of spaces per tab, the second will have to be tabbing at least the equal amount.
>>
Currently working on sky-net defence system. A learning, self aware botnet.
>>
>>59505732

I'm working on a p2p imageboard architecture.
>language
undecided yet, any suggestion? I'm also planning on making a non-bloat web browser as front end (with client side theming and scripting).
>>
>>59505816
I'd write 1-20 by reallocing the array where the text file is stored and memmoving everything to the right of the tab and overwriting the tab with n spaces.
>>
>be me
>in ENGR270
>already know x86_64 assembly so class is extremely easy
>put off final homework until the night before
>school forgot to pay for their GoDaddy webhosting so I can't download the homework
>homework pdf is password protected

>mfw Google has it cached
>>
>>59505757
You know the saying, right? If you want something done right, do it yourself!
>>
>Now it happens to be the case that C++17 is putting exactly the wrong kind of restriction on function calls. They will allow them to remain about as unpredictable as they are now. It's just that compilers can't weave the operations inside the functions. They're still unordered they just removed one of the most important thing about having this.
Can someone explain this further?
>>
https://academy.sciencealert.com/sales/pwyw-learn-to-code-2017-google-go?utm_source=sciencealert.com&utm_medium=referral&utm_campaign=pwyw-learn-to-code-2017-google-go_020217&utm_term=scsf-211745

I've been thinking about buying this bundle for 24 bucks for practice. Is it worth it? Couldn't really find anything on google about science alert. I'm afraid because it seems too cheap.
>>
File: 1487119846038.jpg (56KB, 500x465px) Image search: [Google]
1487119846038.jpg
56KB, 500x465px
>>59505732
Just had a random thought: Why can't we have tuples as class' members? For example, something like:
class Person
{
string Name { get; set; }
(string Day, string Month, string Year) Birthday;
}

And then you can access it like:
person.Birdthday.Day ...

I don't want to write a class/struct just to simply wrap some types.
>inb4 anonymous types
>>
>>59505808
f :: Int -> Float
f = fromInteger . toEnum

inR r (x,y) = ((f x) ^ 2 + (f y) ^ 2) <= r^2
inRG (r,g) p = (inR r p) && not (inR (r - g) p)

go n g = unlines $ map concat [ [ str $ g (i,j) | i <- n ] | j <- n ]

k = 2
b = 2

str b = replicate k (if b then '#' else ' ')

main = do
n <- readLn
let n' = n `div` 2
let r = [-n' .. n']
putStrLn . go r $ inRG (f n', b)


not very good code desu
sorry akarin
>>
>>59506002
No reason
>>
>>59506002
You can with proper record types. What lang is this?
>>
>>59505808
How's mine?
void display_bitmap(char **data, int size)
{
unsigned i, j;
for (i = 0; i < size; i++)
{
unsigned empty = 1;
for (j = 0; j < size; j++)
if (empty && data[i][j])
empty = 0;
if (!empty)
{
for (j = 0; j < size; j++)
putchar((!data[i][j]) ? ' ' : '#');
putchar('\n');
}
}
}

void draw_bitmap(char **data, int size)
{
unsigned orig = (size / 2) + (size & 1);
float i;
for (i = 0; i < 2 * acos(-1.0f); i += 0.01f)
{
int y = sin(i) * (size / 2) / 1.8f; /* term height */
int x = cos(i) * (size / 2);
data[orig + y][orig + x] = 1;
}
}
>>
>>59506078
What do you mean? Now that I think about it: What if another class needs the same tuple? I end up rewriting the same definition for the tuple, which is dumb and redundant and we go back to square one.
>>59506137
>proper record types
Idk what are those, checking rn. I tried making the example in C#.
>>
>>59505765
please no
>>
>>59506176
>What do you mean?
There's no reason that couldn't be part of the language.
>>
ive got a retarded question here guys bear with me
class ContactList
String toString(Contact[] list, int index)
if (index=0)//i need to figure out the base case later
return null;
else
return ((toString(list[], n-1) + "\n" + list[index-1].Contact.toString());


i would like to return the entire list recursively as a big string but the problem that i'm having is that both the superclass and subclass have a method with the same name and I don't remember how to reverse override methods. Basically, how retarded am I? is using a pointer valid?

class Contact{
String toString()
return contactInfo}
>>
>>59505808
>arbitrary size in the terminal!
>10
What does this 10 represent? Radius? Because it isn't
>>
File: smilingpython.gif (13KB, 280x280px) Image search: [Google]
smilingpython.gif
13KB, 280x280px
Is there a simple way to find memory leaks in a Python script?

I have a script that accesses an API (with
requests
module) and downloads small files occasionally. It runs 24/7 and after a day or two it eats so much memory that the OS fills the swap memory completely and starts killing off other processes. I have 512MB of RAM and 256MB of swap, and htop tells me the script starts off at ~5.5% memory usage but gradually grows to over 12%, even though the only data that I'm explicitly storing in the script is a set of short strings, which I'm pretty sure isn't the culprit.

I put "del"s all over my script to delete objects that I thought could have caused this, no effect.
I tried using pympler to look through stored objects, but it hasn't been very helpful.

I'm at a loss right now. Any ideas?
>>
>>59506236
What ancient machine are you on?
>>
>>59505732
>Java
Trash.
>Sepples
Trash.
>P*thon
Trash.
>Ruby
Trash.
>PHP
Trash.
>(((C#)))
Trash.
>JS
Trash.
>Perl
Trash.
>C
Trash.
>VB
Trash.
>R
Trash.
>Scala
Trash.
>Shell
Trash.
>Action Script
Trash.
>>
>>59506280
It's called a VPS, friendo.
>>
> >>59506285
Trash.
>>
What's a good name for a theorem?
>>
>>59506430
(Your Name)'s Theorem
>>
Why aren't you using Ada?
>>
>>59506441
Obviously thought about that already. It's boring.
I would like some anime name.
>>
>>59506430
I don't think people usually name their own theorems; a name organically forms when an important theorem is discovered.
>>
>>59506457
Akari's Theorem
>>
File: 1478756493135.gif (704KB, 600x337px) Image search: [Google]
1478756493135.gif
704KB, 600x337px
>>59506448
Why should I?
>>
>>59506457
Akarin's Theorem
>>
>>59506467
I think people won't mind if I propose some sort of name.
>>59506475
>>59506481
I will think about it.
>>
File: 1485646993134.jpg (216KB, 700x700px) Image search: [Google]
1485646993134.jpg
216KB, 700x700px
>>59506475
>>59506481
cutemind
>>
>>59506215
I think it might be height
But it only counts out to 9 on the first one
>>
Fact: OCaml programmers are the most powerful race in the world.
>>
>>59506508
>in the Old World
ftfy
>>
Fact: Rust programmers are the safest race in the world.
>>
>>59506522
Agreed
>>
>>59506480
It's a systems language that got it right
>>
>>59506522
>he cannot even implement calculus of construction or use any sort of higher order type theory in his language
lmao rustoddlers everyone
>>
Fact: Haskell programmers are the most useless and lazy in the world.
>>
>>59506531
What are you on about? Rust's type system is fuckton more powerful than almost all languages, including C(ancer)
>>
File: delet_this.jpg (9KB, 228x210px) Image search: [Google]
delet_this.jpg
9KB, 228x210px
>>59506531
b-but rust is the safest language ever! it doesn't have the same memory problems that other languages have that lead to security problems! look at the CIA leak!
>>
>>59506531
Thought about learning it but I guess it's trash. Thanks, mate.
>>
>>59506542
*most popular useful languages
>>
File: 1481030175140.png (633KB, 1280x720px) Image search: [Google]
1481030175140.png
633KB, 1280x720px
>>59506528
If what you're saying is true, I'm interested. Elaborate.
>>
>>59506531
I'd pick Rust or Ada over any other language if I wanted security. Like in Bank system, Power plant etc
>>
>>59506550
Oh C is not in the list then
>>
>>59506550
>useful languages
So what you're defining is empty?
>>
>>59506560
Rust isn't either
>>
File: 1488589420294.png (7KB, 377x330px) Image search: [Google]
1488589420294.png
7KB, 377x330px
>>59506531
>tfw started another language flame war ITT without even realizing it
I guess some things just can't be helped.
>>
Reading the rust book.

>>59506522
You mean master race.
>>
>>59506593
>actually a guy
Even better!
>>
File: nervous_twiddling.gif (208KB, 354x534px) Image search: [Google]
nervous_twiddling.gif
208KB, 354x534px
>>59506593
I-I want to learn rust, but there isn't any Rust book by Brian Kernighan so I can't learn it.
>>
File: 16266354.png (857KB, 896x960px) Image search: [Google]
16266354.png
857KB, 896x960px
>>59506615
All you need: https://doc.rust-lang.org/book/
>>
>>59506633
me on the top right
>>
File: 564.gif (4MB, 250x140px) Image search: [Google]
564.gif
4MB, 250x140px
>>59506633
I wish the book was better. It's structured well but there is are no practice sections.
>>
>>59506666
I hate touch screen
>>
>>59506556
The power of C++ but with a real type, tasking, and formal verification system. It also has the novel concept of specifying your type sizes and fixed point arithmetic, as is it's a real systems language.
>>
File: face_slam.gif (1020KB, 500x373px) Image search: [Google]
face_slam.gif
1020KB, 500x373px
>>59506633
I-I tried reading other programming books but its too hard because they don't explain the concepts as well as Kernighan does. The only programming language I know is Go because it has a book written by Brian Kernighan. The only other books I read on programming are the Practice of Programming and the Unix Programming environment for the same reason. I'm not very smart ⊙﹏⊙
>>
>>59506448
Is it OOP trash by any chance?
>>
>>59506711
Start with Haskell.
>>
>>59506711
If you already know a language it should not be that hard. Where are you stuck? Have you tried asking in their beginners' IRC?
>>
>>59506728
This. Rust is pretty easy once you know Haskell and any other imperative language.
>>
File: awkward.jpg (52KB, 374x638px) Image search: [Google]
awkward.jpg
52KB, 374x638px
>>59506728
I can only learn it if it has a Brian Kernighan book as explained here >>59506711
>>
File: blush.gif (114KB, 375x443px) Image search: [Google]
blush.gif
114KB, 375x443px
>>59506733
I-I tried to learn java but its too hard ⊙﹏⊙. I-I couldn't understand anything, I don't understand what an object is or inheritance, so I-i gave up ;_;
>>
>>59506770
Seeing how retarded you are, C might be the language for you. It does an amazing job containing programmers that aren't all that smart.
>>
>>59506788
D-Does it have a book by Kernighan which I can learn from?
>>
>>59506799
Dunno
>>
>>59506799
Can you stop typing like a fucking idiot?
>>
>>59506770
>java
Why would you be learning that piece of trash?
>>
File: 6-4aQ-Qp.jpg (42KB, 512x512px) Image search: [Google]
6-4aQ-Qp.jpg
42KB, 512x512px
>>59506811
Can you stop bullying?
>>
What techniques do you use to find memory leaks in codebases of 100k+ lines of code?
>>
>>59506897
Using Rust.
>>
>>59506897
Install Gentoo
>>
>>59506448

I learned some Ada in my first year studying computer science at uni. Haven't used it since then, since it's a pain in the ass compared to C++.
>>
File: project-euler.png (4KB, 300x180px) Image search: [Google]
project-euler.png
4KB, 300x180px
Getting anally probed by Project Euler

I'm currently doing a problem pertaining to Totient functions (the number of all terms that are relatively prime to a number n), and I thought my smart-ass had figured out an efficient manner of calculating the function.

Except it's almost always off by one. It's either one above or one below, and I'm pretty sure it's because I computers don't have infinite-precision decimal places...

Here's my code... I can't seem to find a way to make it work
/*
(T(n) = totient (n) == Phi(n))

From one of Euler's many identities,
n/T(n) === PI[of all prime numbers that divide into n] (p / p-1)
//(Note, [all prime numbers that divide into n] can be written as p|n
Therefore,
T(n) = n *PI[p | n] (p-1/ p)
*/
long Totient(const long n, const set<long>& primes, long& result)
{
double product = 1;
int sqrtN = sqrt(n);
for(long prime : primes)
{
if(prime > sqrtN)
break;
if(n % prime == 0)
{
double factor = 1 - double(1)/prime;

double prime2 = n/prime; //Because we're only going to sqrt(N), we need to take into account
//The prime number that is n/ prime (otherwise, we'll be a bit off);

double f2 = 1 - double(1)/prime2; //The fraction on the "other side" of sqrt(N);

product *= factor;
product *= f2;
}
}
result = n*product;
return result;
}


Unrelated, but how's HackerRank? I started doing some of the intro problems and they seemed kind of easy... Do they get to "Project Euler" difficulty?
>>
>>59506905
Ironically my next project will be in Rust
>>
>>59506160
nice
>>
>>59506905
this
>>
File: Hate Thinks You're Great.jpg (169KB, 1366x768px) Image search: [Google]
Hate Thinks You're Great.jpg
169KB, 1366x768px
>>59506160
Fucking dope

Unrelated, but
What are you guys's thoughts on Moral Luck?
>>
>>59506932
How is it a pain?
>>
>>59506966
Ultimately, consequences are the only thing that really matters
>>
>>59506933

I don't know the specifics of your problem and I'm not trying to figure it out but generally when you are doing floating point operations you want to set up your shit so a) there are fewer of them, and b) they all happen at the end.

I don't really remember the reasoning behind this tip but I think it has something to do with the error growing larger every time you do something to a floating point number so you want them to not be floating points til the very end to minimize the error.
>>
When the BSD license requires you to include a copy of the license with a binary release, does that mean just DLL releases or do I need to retain the license in a larger program?
>>
>>59506992
Huh... Didn't even occur to me to use that trick...Pretty genius imho...

Unfortunately, I'm still running into the same error... I think I"ll have to go back to the drawing board for this one.

Thanks anyways!
>>
>>59506236
Memesnek has memory leaks? I thought it did GC? Are they really managing to fail at detecting circular references?
>>
>>59506002
For what purpose? Just make a Birthday class and have a Birthday object instance.
>>
>>59506826
Learn based Haskllllellll (・へ・)
>>
>>59506788
This is a very strange way to say that other languages are unnecessary complicated. It's probably true that if we were to look for the smartest programmer he or she won't be using C as their primary programming language. But that's not to say C programmers are stupid or incapable of solving complicated problems.
>>
>>59506967

It's like walking on eggshells. The type system is strong, but it's anal retentive about things, requiring casts where it might be reasonable to infer things. Also, I'm not a fan of having to declare all variables before using them, rather than just declaring them as I use them.
>>
>>59507182
You probably didn't understand the proper usage, since the type system makes it easier to write programs.
>>
>>59507076
I've never had such issues before, but also this script is written in a way I've never tried before (nothing too crazy, though). I don't have a complete mental grasp on what circular references are and how they happen in my code, but I have a suspicion that really makes me think it's worth looking into them.
>>
>>59507234

While it was true that I was a bit of a beginner when I was learning Ada (I knew some basics from before uni, but lacked much experience), I would still disagree with that assertion. The type system of Ada is stronger than should be necessary to write safe programs. It should be reasonable to believe that if two types are equivalent, that they can be freely converted without need for a cast. This is not so true for Ada, which could be described as verbose at best.
>>
>>59505732
Ching ching Chan chunk!!
>>
im learning inheritance with java, if i have this method
public void testMethod(FatherClass fc) {
//do the same things for ChildClass1, ChildClass2 ...
}

why doesnt it let me pass him arguments of any of its child classes? i want it to work with any of its sublcasses, not just the main one. otherwise i would have to make an identical method for each of the child classes

thanks for any help
>>
>>59507274
Why would you be comparing variables of different types? If they are relatable, then they should be declared as subtypes, which don't require casts.
>>
>>59507301
That should work. Give us more details.
>>
Am i doing this right?

I'm parsing this DateTime format
Sun Sep 01 00:00:00 GMT+08:00 2019
using this pattern

"EE MMM dd HH:mm:ss z yyyy"
>>
File: SCR_1490085507.png (18KB, 519x125px) Image search: [Google]
SCR_1490085507.png
18KB, 519x125px
what did he mean by this
>>
>>59507304

Consider the following snippet from the Ada wikibook:
type Integer_1 is range 1 .. 10;
type Integer_2 is range 1 .. 10;
A : Integer_1 := 8;
B : Integer_2 := A; -- illegal!


These are obviously the exact same type, but the compiler disagrees.

Programming in Ada is not a pleasant experience. It can make programming take longer, with the exception that it may make one have less time to spend on debugging.
>>
>>59507324
the method is not actually a method, it's a constructor for another class, which is a child class from a different parent and calls super(args)
>>
@59507381
What kind of retardation is this? If the type-checker / proof-checker disagrees, then they are by definition not the same type. Unless you are claiming there is some sort of bug in the compiler.
>>
>>59507410
>>@
>>
>>59507416
Yes?
>>
>>59507381
Types signify a divide between data. While the values in memory may be the same, they do not represent the same thing. Take the standard Integer, Positive, Natural types. Positive and natural are declared as subtypes of Integer. They can be freely compared because the represent a vague number.

However, a meter and a foot cannot logically be directly compared and requires a cast to verify to the compiler you know what you're doing.
>>
>>59507416
newfag
>>
>>59507410
be anon
>browses /g/
>posts opinion on post
>realises brain.exe not working because it disagrees with the compiler
>decides something is wrong with brain.exe not compiler
>>
>>59507267
I assume a GCd language would only have problems with circular references. That's the only case I can consider that's at least a little difficult for a GC. But you should look into memory leaks in python in general.
>>
>>59507451
Why would an (((exe))) file disagree with a compiler? What fucking business could it possibly have with a compiler?
>>
>>59507381
>>59507439
Also,
>The are obviously the exact same type
Actually, they are explicitly completely different types, with the same number range.
>>
>>59507439

Positive, natural, and integer are not the same types. A value of 0 cannot be stored in a positive, and a negative value cannot be stored in a positive or a natural. What I showed were two types that are exactly the same in every way except for the name used for them.
>>
>>59507416
report them
>>
@59507559
You claimed they were """""obviously""""" the """""same""""". Which is a retarded thing to say.
>>
>>59507327
nevermind, I solved this finally
>>
>>59507559
What would you say the definition of a positive number is
>>
>>59507585
x + p > x
where p is positive
>>
>>59507576
>>@
>>
>>59507593
Makes sense
>>
cute thread
>>
>>59507585

Since we were working on Ada's terms, Positive refers to an integer equal to 1 or higher. and Natural refers to an integer that is 0 or higher.

>>59507576

They are the same type because every value that can be an element of one type can also be an element of the other, and every value that cannot be an element of one type also cannot be an element of the other. That is, if we think of types as sets, they are obviously equivalent. If X = { A,B } and Y = { A,B }, then can it not be said that X = Y?

Also, could you stop using the fucking @ symbol when quoting? This isn't a fucking Discord channel.
>>
>>59507559
But they represent the same thing, a ubiquitous number, which is why they are subtypes of Integer. That's the important takeaway. This lazy way of programming you're used to is what led to that orbiter crashing 15 years ago.
>>
>>59507612
What do you mean by this?

@59507630
>then can it not be said that X = Y?
Not in this type system. You might argue that it's retarded, but you simply can't call yourself sane if you claim that they are equal when the proof checker disagrees.
>Also, could you stop using the fucking @ symbol when quoting?
Nope, I will always reply to subhumans in this manner. Your ilk isn't worthy of a proper response.
>Discord
What is that? Some reddit tier cancer?
>>
>>59507644
>tier
You've got to go back
>>
>>59507644
>>@
>>
>>59507654
What kind of idiotic statement is this? How can someone go back to the place they are currently in?
>>
>>59507678
Is English your second language?
>>
Decided to write own string parser library in D
>>
>>59507746
Fourth actually.
>>
>>59505732
Why isn't there Lisp?

Somebody should contact that author and tell him he's forgetting Lisp.
>>
>>59507785
> he's forgetting Lisp
Aren't we all?
>>
>>59507639

The orbiter crashed because someone thought it was acceptable to be using imperial units in space. It had nothing to do with wrong types, just wrong units.

Also, Positive, Natural, and Integer are not the same thing, because they do not represent the same set of values.

>>59507644

>but you simply can't call yourself sane if you claim that they are equal when the proof checker disagrees
I am saying that on an abstract level, if we strip the language out of the picture, two types that both represent integer values 1..10, but which have different names, are the exact same type. The fact that the language does not recognize the equivalence of two types that are the same by definition, is retarded.

>What is that? Some reddit tier cancer?
Think of it like IRC with voice chat, or Skype without video calls. Also, it's written in proprietary JavaScript. It's not ideal, but it's what everyone's using for communicating these days, at least among 4channers. We have a /dpt/ Discord server if you'd like to check it out. It mostly consists of a Haskell shitposter who calls himself Karen Kujo, and a couple of tripfags.
>>
File: anime_stare.jpg (354KB, 1920x1080px) Image search: [Google]
anime_stare.jpg
354KB, 1920x1080px
Why should I learn Haskell?
>>
>>59507806
>It had nothing to do with wrong types, just wrong units.
aren't you supposed to be an F# fag?
https://fsharpforfunandprofit.com/posts/units-of-measure/
>>
>>59505732
>javascript is best girl
Someone explain this
>>
>>59507818
very good type system
pure
will teach you things you don't know
very good for compilers
>>
>>59507828
>very good for compilers
What are some good books? I've been learning it in part for this.
>>
>>59507806
>We have a /dpt/ Discord server if you'd like to check it out
Who the fuck is "we"? Get out of here with the proprietary garbage.
>>
>>59507806
Types ARE units.

They represent the same thing, but have different ranges, which is why they are subtypes.
>>
>>59507826
>girl
I am into mature women
>>
>>59507806
>We have a /dpt/ Discord
Is this /v/?
>>
>>59507836
there aren't that many haskell books
>>
import std.stdio, std.conv, std.traits, std.complex;
template isComplex(T) {
static if ( is(T == Complex!double) ) {
enum bool isComplex = true;
}
else static if ( is(T == Complex!float) ) {
enum bool isComplex = true;
}
else static if ( is(T == Complex!real) ) {
enum bool isComplex = true;
}
else {
enum bool isComplex = false;
}
}

template isComplexOrNumeric(T) {
enum bool isComplexOrNumeric = (isComplex!T || isNumeric!T);
}

class Example(T) if (isComplexOrNumeric!T) {
T k = to!T(1);
}

void main() {
auto x = new Example!(Complex!double)();
writeln(x.k);
auto y = new Example!double();
writeln(y.k);
}
>>
>>59507866
What are some books in other languages? And are they easy enough to adapt into Haskell?
>>
>>59507879
Could you fit any more dead memes into your post?
>>
>>59507912
>el meem
ecsdee
>>
>>59507828
How is Haskell good for compilers? Does Haskell have good concurrency? If Haskell is so good, how come it isn't widely used? Is Haskell as good as or better than Lisp? Is Haskell like a Lisp 2.0?
>>
>>59507826
Bigger question is why Ada isn't even there.
>>
>>59507820

I've been playing around with F# a bit, but I don't consider myself dogmatic for it. I tend to break a few best practices with it too, like almost never using the built-in list class where I can use an array, and preferring the system.collections.generic.list class (vectors) for anything dynamic, even if it means writing lots of impure functions.

I haven't yet seen the measure types available in F#, and I'm not sure if I'd end up using them.

>>59507843

Err... not quite. A type is a way of describing what some chunk of memory means, and what sorts of operations can be done on it, and how they should be performed. Units can be a kind of type, in that they further describe data, but they need not be implemented as types. It is perfectly acceptable for me to describe my height and mass as simple integers, and let it be implicitly known by the programmer through documentation that they are to be measured in centimeters and kilograms. Creating a new type for everything leads only to verbose code.

>>59507840

As in all of the posters come from here.

>>59507851

No, this is /g/. You took a wrong turn at Albuquerque.
>>
>>59505732
What I'm making is way too complex and advanced for the common /g/ user to wrap his head around it. Sadly most of you plebs have hard time printing something as simple as hello world. But what ca I expect /g/ is nothing but memes and old jokes....
>>
>>59507892
there's a book for writing compilers in ML
>>
>>59508017
>A type is a way of describing what some chunk of memory means
Oh, so a unit?
>It is perfectly acceptable for me to describe my height and mass as simple integers
Sure, if you think it makes logical sense to compare them, and that it's ok to input a mass into a function expecting a unit of length.
>>
>>59508017
>I haven't yet seen the measure types available in F#, and I'm not sure if I'd end up using them.
the idea is just that there's an extra someone more hidden type system for units, so stuff like kilometers vs miles is either a type error or is converted by the compiler
>>
>>59508017
Discord is for video gamers.
Take your shit to >>>/v/
>>
>>59508111
Are you telling me that compilers aren't games?
>>
>>59508126
Yes
>>
>>59508134
Then why is writing code so much fun?
>>
>>59508153
Because it's your first year
>>
>>59508153
>If something is fun, it is a game
is givn ur mum the dik a game?
>>
>>59508153
>He's having fun writing code
Wait till you get a job.
>>
>>59508098

>Oh, so a unit?
Think more generic than that.

>Sure, if you think it makes logical sense to compare them, and that it's ok to input a mass into a function expecting a unit of length.
Programmers who act like total fuckwads with their code ought to be punished for it.

>>59508102

I am aware of the potential benefits of doing so, I just think it makes programming more of a chore than it needs to be. I do not think that languages with very strong and expressive type systems like Ada don't have a use. I just don't think they're ideal for everyday programming.

>>59508111

The actual audience of Discord is a bit larger of a group than the target audience. Not every server is focused on gaming.
>>
>>59508191
>The actual audience of Discord is a bit larger of a group than the target audience. Not every server is focused on gaming.
So non gamers are second class citizens? Yeah you can talk about technology in /v/ which doesn't mean /v/ is is for gentoomen
>Go to features page
>Gamer oriented shilling
>>
File: 1374580566292.jpg (9KB, 344x209px) Image search: [Google]
1374580566292.jpg
9KB, 344x209px
>>59508191
>Reddit spacer
>Pushes stupid proprietary shit like Discord
>Ponyfag (with the custom made plush to prove it)
>Sepplesfag
>Winfag
>/v/fag
I don't like you.
>>
>>59508191
Types offer self documenting code, what you would have to use comments for in simpler languages like C++. You don't have to use them in Ada, but they are so simple and obvious to understand and offer the freedom from simple logical errors that are the real chore to debug.
>>
>>59505732
Inb4 HTML
>>
I have a question about arrays.
I have a 1-dim array of strings which hold data of users
They are separated by |. I want to order them by name, which is the second element (first is ID). How do I achieve this without screwing up all the IDs?
IE
Id:1|name:poo
Id:2|name:loo
I want loo to be before poo, but change his id
>>
>>59508236
Use (((structs)))
>>
>>59508226
there are features that integrate certain gaming platforms and that was its intention but i know many people that use it as a free and more feature packed slack

in fact most of the people in my personal discord that i have for friends dont play video games at all and theyre all part of larger communities in discord that arent playing video games either

and in the past half year theyve been implementing many many features that have nothing to do with video games, like searching, pinned messages, etc. and theyre going to be adding screen sharing very soon

i actually cant remember a recent feature that was explicitly meant for video gaming
>>
>>59508229
what is this reddit spacing meme? why does it matter how you format your post with a few extra newlines? it can make it more readable
>>
>>59508244
>I know people that use video gamer chat like normal chats
The fact that a minority of its users are not using it the way it's meant to be used doesn't change the fact that discord is for video gamers.
>>
>>59508236
Are you really using table of strings like this? Use structs:
struct User{
int id;
char* name;
}
>>
>>59508262
>minority
unless you work for discord and can provide numbers on this, i highly doubt non-gamers are a tiny minority of its users

discord is just the most recent communication app that is stupid easy to use and setup that makes pretty much every other form of communication obsolete for a majority of normies, video gamers or not
>>
>>59508275
Shit, I've fucked up closing code tag and forgot ; after struct definition.
>>
>>59508226

>So non gamers are second class citizens?
Not at all! While Discord was developed with gamers in mind, its feature set appeals to more than just gamers. Hence, why there are many servers for non-gaming activities and discussion.

>>59508229

>Reddit spacer
I don't have a Reddit account.

>Pushes stupid proprietary shit like Discord
I am not telling people they should or ought to use it. I am merely saying why others choose to use it.

>Ponyfag (with the custom made plush to prove it)
Yes, and?

>Sepplesfag
Yes, and?

>Winfag
I actually switched back to Linux.

>/v/fag
Nope!

>>59508230

You will have logical errors in any language, including Ada. Types can offer self-documentation, but only so much.
>>
>>59508276
>unless you work for discord and can provide numbers on this
I can use my common sense and claim that a video gamer chatroom is dominated by video gamers as intended.
>>
>>59508293
See >>59508262
>>
>>59508260
It's attention whoring. You're artificially increasing the vertical space your post takes, so people can see it easier.
It's also extremely sloppy writing style. Usually the sentences are extremely short, fragmented, lack punctuation, and don't form to make any sort of coherent point. Ruby isn't the worst offender in this regard, but it's still stupid.
>it can make it more readable
If you actually paragraphed your shit properly, that would be much easier to read.
>why does it matter how you format your post with a few extra newlines?
Practically every aspect of your post can be used to profile you. If your post indicates that you're a filthy redditor, I'm going to tell you to fuck off.
>>
>>59508229
>responding to n*mefags
I don't like you.
>>
>>59508294
again youd be wrong unless you have a very narrow definition of dominated because there are a stupid amount of communities using discord as their general purpose platform for communication

because again its easy to use and set up and literally young 20 something is using it, its what skype was in its golden years

you can say skype wasnt meant for gaming, but that doesnt change the fact a huge amount of its user base was using it for gaming
>>
>>59508293
>I am not telling people they should or ought to use it. I am merely saying why others choose to use it.
You were clearly trying to act like it was "endorsed" or "official" (whatever those terms could possibly mean here). Stop trying to push it.
>>Ponyfag (with the custom made plush to prove it)
>Yes, and?
MLP is shit, and you have shit taste.
>>Sepplesfag
>Yes, and?
C++ is shit, and you have shit taste.
>I actually switched back to Linux.
You're always going on about stupid winshit things, like C#, F#, and the like. If those aren't the tells of a stupid Winfag (or the more general 'Microcuck'), I don't know what is.
>Nope!
I saw you replying to that stupid Zelda thread on here.
>>
>>59508319
>there are a stupid amount of communities using discord as their general purpose platform for communication
And there are a stupid amount of communities not using discord as their general purpose platform for communication. What are you trying to prove here? I made it completely clear that
1. Discord is meant for video gamers
2. Discord's featureset aims toward /v/
3. A few people there use it as skype while they have no use for discord
And finally
Discord is NOT a part of /dpt/, not even /g/
>>
>>59508319
>>59508276
>>59508244
Take your discrord shilling and fuck off back to >>>/v/, gamer trash manchild
>>
What has better metaprogramming, Lisp or Forth?
>>
>>59508381
The C Preprocessor.
>>
>>59508381
D
>>
File: 1427321171696.jpg (12KB, 400x400px) Image search: [Google]
1427321171696.jpg
12KB, 400x400px
>Inconsolata
>>
>>59508393
>OOP garbage.
No, thanks.
>>
>>59508391
>(((Preprocessor)))
LMAO just admit C has no meta programming and cry in the corner
>>
>>59508397
whom are you quoting?
>>
File: f32.jpg (34KB, 584x388px) Image search: [Google]
f32.jpg
34KB, 584x388px
>>59508393
>metaprogramming
>'c' 'pre'processor
>>
>>59508423
meant for >>59508391
>>
File: 1307559619452.jpg (20KB, 544x400px) Image search: [Google]
1307559619452.jpg
20KB, 544x400px
>C
>Metaprogramming
>>
>>59508299

Right, you didn't understand my response at all. Just because it was designed for one group does not mean that other groups are treated as second class citizens. The features that make Discord appealing to others are features that do not require one to like video games to enjoy.

>>59508307

>It's attention whoring. You're artificially increasing the vertical space your post takes, so people can see it easier.
Making something easier to read does not necessarily imply attention whoring.

>>59508347

>You were clearly trying to act like it was "endorsed" or "official" (whatever those terms could possibly mean here). Stop trying to push it.
I stated that there is a /dpt/ Discord server. There is no falsehood in this statement. There is a Discord server created by /dpt/ posters, that exists entirely of /dpt/ posters. While I did offer to show the server to the uninitiated, this should not be construed as promotion of it. I am only providing information.

>MLP is shit, and you have shit taste.
>C++ is shit, and you have shit taste.
So we have different tastes.

>You're always going on about stupid winshit things, like C#, F#, and the like. If those aren't the tells of a stupid Winfag (or the more general 'Microcuck'), I don't know what is.
I have been experimenting with C#, F#, and PowerShell on Linux using .NET Core.

>I saw you replying to that stupid Zelda thread on here.
Just because I like video games does not mean I post on /v/. I'm not that heavy of a gamer, to be honest.
>>
File: anal.jpg (26KB, 526x361px) Image search: [Google]
anal.jpg
26KB, 526x361px
>>59508432
>C
>Anything
>>
File: 1456518382216.jpg (37KB, 650x383px) Image search: [Google]
1456518382216.jpg
37KB, 650x383px
>2017
>existence of C
>>
>>59508240
>>59508275
nvm fixed :^)

In all honesty though, I have no idea whay structs are. Yes, I am writing into file like that, it's a course which limits what you can do. Here for example, you're not allowed to do databases, so I'm writting into file like that
>>
>>59508467
>:^)
>>>/r/ibbit
>>
>>59508433


>Making something easier to read does not necessarily imply attention whoring.


as a tripfag you're obviously attention whoring


the reddit spacing is clearly adding to that


>a /dpt/ Discord server


even calling it this is an endorsement as "official"


just say a bunch of proprietary cucks have gotten together to talk about shitty video games when mentioning the discord server


>So we have different tastes.


my tastes are clearly better


>>59508404


>>59508428


Thanks for the upvotes.


>>59508432


>>59508441


>>59508452


please upvote me next time you post
>>
>>59508308
this
>>
>>59508351
my point is youre completely wrong on 2

theyve been consistently adding features that have absolutely nothing to do with video games and everything to do with fleshing it out as a communication platform

and it is a part of /g/ you fucking idiot, it is quite clearly technology
>>
>>59508467
>I have no idea whay structs are.
You are even dumber that C tards
>>
>>59508492
Discord is a free voice and text chat app designed specifically for gaming.

Discord was born out of our own frustrations with the voice and chat tools we all use while playing games. It’s a bit strange that in 2015 most of us are using chat apps that haven’t been updated in years to play games that are updated every week. We deserve better.

Discord brings gaming communication out of the stone age. It's free, easy to use, and with you even while you are AFK.

Just fuck off to your video gamer chat or >>>/v/
>>
>>59508472
>>59508433
please both leave
>>
>>59508505
are you going to completely fucking ignore what theyve been doing with the app the past half fucking year or are you going to keep parroting marketing from its inception
>>
>>59508433
>>59508511

Fucking idiot just get the fuck out
>>>/v/
>>
>>59508472

Okay, you're adding two spaces between each line, which is fucking overdoing it. That actually makes it more of a pain to read.

>even calling it this is an endorsement as "official"
Calling it official is not necessarily an endorsement of its usage. It just means that among Discord users on /dpt/, it is the server used for /dpt/ matters.

>just say a bunch of proprietary cucks have gotten together to talk about shitty video games when mentioning the discord server
They mostly talk about Haskell and anime, to be honest, just like in thread.

>my tastes are clearly better
Opinions are like assholes.
>>
>>59508511
>are you going to completely fucking ignore what theyve been doing with the app the past half fucking year
Yeah, the video game chat is making improvements. What are you trying to say here?
>>
>>59508472
>>59508507
why are you responding to it, retards?
>>
>>59508553
why are you responding to him responding to them, retard?
>>
>>59508560
why are you responding to me responding to them, retard?
>>
>>59508569
kill me and then kill yourself please
>>
>>59508471
>>59508495
Could you explain please?
>>
for h := 0 to x-1
for g := 0 to y-1
if A[h] == B[g]
return true
endif
endfor
endfor
return false

If A & B are sorted how could I rewrite this in order to improve its run time complexity?
>>
File: 1473068569478.jpg (10KB, 164x160px) Image search: [Google]
1473068569478.jpg
10KB, 164x160px
>>59508523


>That actually makes it more of a pain to read.


w h y ? i t s p a c e s e v e r y t h i n g o u t m o r e a n d m a k e s i t l e s s a n n o y i n g t o r e a d


>They mostly talk about Haskell and anime, to be honest, just like in thread.


w h a t s t h e p o i n t t h e n ?


>>59508553


m a x i m u m s h i t p o s t i n g


>>59508511


w h o t h e h e l l c a r e s ?


i t ' s s t i l l p r o p r i e t a r y s h i t

I should probably stop. Now even I think I'm going too far.
>>
>>59508607
Damn, 4chan trims 3+ spaces down to 2, and 2+ spaces down to 1.
>>
>>59508600
C tards are notoriously too dumb to understand any sort of abstractions. The fact that you don't know what structs are made you sound like a C tard when they yell "I don't know what generics are". I know C has structs but you do sound like a babby C tard
>>
>>59508619
>4chan trims 3+ spaces down to 2, and 2+ spaces down to 1.
kek
>>
>>59508634
>>59508619
I meant to say 3+ blank lines. I said 'spaces' twice.
>>
File: circle.png (27KB, 1380x589px) Image search: [Google]
circle.png
27KB, 1380x589px
>>59505808

How did I do?

require 'matrix'

def circle h
m = Matrix.build(h, h) do |row, col|
x = (row - h/2).abs ** 2
y = (col - h/2).abs ** 2
(h*2 < ((h/2)**2 - (x+y)) or h > ((h/2)**2 - (x+y))) ? "#" : " "
end

(0...h).each {|i| puts m.row(i).to_a * ""}
end

circle 32
>>
>>59508643
What is this 32?
>>
>>59508643
>end
>>
>>59508607
Ah yes, this is the logical conclusion of increasing readability. I should call up every higher education facility on earth and inform them that 10 line spacing is the new 1.5.
>>
>>59508659

The argument.

In Ruby you can either write
circle(32)

or
circle 32

..

>>59508660

>whitespace indention as a part of the syntax
>>
>>59508631
I use C# and am a beginner, just learning it. What are they?
>>
>>59508643
Nice!
>>
File: 1489880434820.jpg (147KB, 2038x1505px) Image search: [Google]
1489880434820.jpg
147KB, 2038x1505px
>>59508697
You'll learn soon
>>
File: anal beads.png (9KB, 717x137px) Image search: [Google]
anal beads.png
9KB, 717x137px
>>59506002
>
    (string Day, string Month, string Year) Birthday;


Well, this particular example is pants-on-head retarded, because
BirthDay
ought to be a DateTime which already exposes this functionality.
>>
File: anal beads.png (11KB, 427x369px) Image search: [Google]
anal beads.png
11KB, 427x369px
>>59506002
>Just had a random thought: Why can't we have tuples as class' members? For example, something like:

Also, I just tried this, and you actually can, ya dingus.

Pic related compiles fine.
>>
>>59507806
>and a couple of tripfags
literally only you, gtp, and nv
>>
>hate lisp
>Read SICP
>Love lisp
>>
>>59508959
Except SICP if for closure
>>
>>59508959
I meant scheme, for scheme
>>
Is there a programming approach that can minimize amount of source files spawned during development?

I'm fucking tired of one concern -> one class -> one file bullshit.
>>
>>59509019
>one concern -> one class
This is an incredibly naive way to program.
Don't fall for the OOP memes.
>>
File: 17426184.jpg (70KB, 960x960px) Image search: [Google]
17426184.jpg
70KB, 960x960px
The software industry is continuously evolving at a breakneck pace. New ideas appear, and older ideas are either validated or discarded. What programmers need and want out of a programming language changes. Available memory and computing power have increased by orders of magnitude, as well as the scale of programs being developed.

Compilers are no longer terribly constrained by available computing resources, and so are able to do much more for the programmer. Much more powerful language features have become practical. These features can be difficult to retrofit into existing languages, and when there are enough of these, a new language is justified.
>>
>>59509019
That is, I'm two weeks into trello clone on angular2 and I have 43 files.
>>
>>59508916

A "couple" means either exactly 2, or an "indefinite small number", informally between 2 and 4. So literally just me, nv, and gtp would still make a "couple" of tripfags.

>>59509019

There is nothing stopping you from putting everything in one file, except for the fact that it's a dumb idea.
>>
>>59509037
Filtered
>>
>>59509019
Don't fall for the OOP meme
>>
>>59509019
>I'm fucking tired of one concern -> one class -> one file bullshit.
Then program however you see fit. If this works for you, as an individual developer, feel free to do it.

Personally, I don't mind grouping related classes/interfaces in one file on my projects, but I don't do it when working with a team.
>>
File: 1479443782601.png (50KB, 418x513px) Image search: [Google]
1479443782601.png
50KB, 418x513px
>>59508381
>>
Does any other language have github automation like Rust's? It's pretty neat but god, their gold-star mentality is pretty gross.
>>
File: 1480103102163.jpg (45KB, 640x727px) Image search: [Google]
1480103102163.jpg
45KB, 640x727px
fuck me i hate gui
>>
>>59509106
>get comfy creating the data models and getting everything working
>realize you now have to display it in an attractive and intuitive way to complete retards
>lose interest in project
>>
>>59509099
It's just your phase, some day you will stop being an edgy 4chen haxor and become a normie
>>
@59509128
wrong person m8?
>>
File: as3.jpg (95KB, 823x595px) Image search: [Google]
as3.jpg
95KB, 823x595px
>>59505884
Always use Actionscript anon
>>
>>59507785
They're too retarded for Lisp anyway.
>>
>>59506160

thicc. can you please explain the math behind the drawing function?
>>
>>59507935
I have been using Haskell for awhile now, and this is what I have found wrong with the language:
>horrid macro system
>modules are deficient compared to the module system of OCaml or the package system of Common Lisp
>partial functions pervade the language
>broken records (ugly hacks are needed to get around their deficiencies, leading to overengineered libraries like lens)
>most libraries are in alpha and look like a college student's summer project
>library authors tend to pepper their libraries with ugly, meaningless, custom operators, contributing to the overall ugliness of the ecosystem
>String as [Char]
>easily subverted type system with unsafe functions
>laziness makes it a chore even for experienced programmers to reason about algorithmic complexity
>in 30 years of existence, Haskell has yet to become a proven asset in industry
>>
>>59509353
>can you please explain the math behind the drawing function?
Do you not know basic trigonometry?
>>
File: cfont.gif (6KB, 720x400px) Image search: [Google]
cfont.gif
6KB, 720x400px
>>59507644
>>59507576
>>59507410
>>59509142
>@
Are you programming or identifying potions?
4chan isn't a fucking roguelike. Get out.
>>
>>59506160
You could directly save ' ' and '#' in the data array
>>
@59509415
(You) denying is the future
>>
>>59506285
ur shit
>>
>>59509436
This post must be in the Trash monad.
>>
>>59509415
He's one of /dpt/'s many resident obnoxious catchphrase posters alongside "guy from plebbit who keeps redirecting retards to plebbit in order to fit in" and "stopped reading there"-tard who make consistently terrible and always recognizable posts because they've become so deluded by the "4chan is for LE SHITPOSTINGS x---DDDD" plebbit brainwashing that they have forgotten what it means to actually talk about things without sounding like a huge mongoloid.

Just don't try to engage with them, nothing good comes out of it.
>>
>>59505884
probably python also how are you handling finding other people
>>
File: 1401489490268.png (58KB, 1517x722px) Image search: [Google]
1401489490268.png
58KB, 1517x722px
>>59505732
>What are you working on, /g/?
I don't ever work.
>>
Hi guys I'm build a new chat concept, i hace a question, for the server is there anything better than Erlang to manage rooms and pass messages around?
>>
File: anal beads.png (8KB, 647x625px) Image search: [Google]
anal beads.png
8KB, 647x625px
>>59505808
Scrappy C# version, used some of the maths from >>59506160 because a C# programmer's mark of excellence is plagiarization:

static void DrawCircle(int radius)
{
var circle = new char[radius * 2, radius * 2];
(int x, int y) center = (radius, radius);
for(float f = 0; f < 2 * Math.Acos(-1.0); f += 0.01f)
{
int x1 = (int)(center.x + (Math.Cos(f) * (radius / 2)) / 2.0);
int y1 = (int)(center.y + (Math.Sin(f) * (radius / 2)));
circle[x1,y1] = '#';
}
for (int i = 0; i < circle.GetLength(0); i++)
{
for (int j = 0; j < circle.GetLength(1); j++)
{
Write(circle[i, j]);
}
WriteLine();
}
}

//TODO: rewrite using LINQ
>>
>>59509714
Yes
>>
>>59509760
>//TODO: rewrite using LINQ
The absolute madman!
>>
File: 1431811264274.gif (3MB, 359x202px) Image search: [Google]
1431811264274.gif
3MB, 359x202px
>>59509760
>he's using sin and cos
>not exp()
TOP KIK
>>
>>59509763
Can you give me an example? I heard about Meteor, but Javascript on the backend seems off
>>
>>59509929
Just use Java and Python
>>
File: file.png (67KB, 487x466px) Image search: [Google]
file.png
67KB, 487x466px
Could it be that every obnoxious comment I've read on twitter is actually just someone making a bad joke?
>>
>>59509970
;)
>>
>>59509970
https://en.wikipedia.org/wiki/Poe%27s_law
>>
>>59509970
bad jokes are obnoxious but not every obnoxious thing is bad joke.
>>
>>59506160
why not use M_PI since you're using math.h already
>>
>>59505732
Currently I'm polishing the print quality on my 3D printer.
Because we all know how absolutely vital that is for writing a 3d model slicer.
>>
>>59509954
Nah, not really oriented to concurrency like Erlang.
>>
File: circle.png (41KB, 1609x648px) Image search: [Google]
circle.png
41KB, 1609x648px
>>59505808
>people use trigonometry to do this
fn main() {
let r: isize = 10;
let r_2_from = r.pow(2);
let r_2_to = (r + 1).pow(2);
let size = r * 2 + 1;
for y in 0..size {
let y_2 = (y - r).pow(2);
let line: String = (0..size)
.map(|x| {
let r2 = (x - r).pow(2) + y_2;
if r2 >= r_2_from && r2 < r_2_to {
'X'
} else {
' '
}
})
.collect();
println!("{}", line);
}
}
>>
File: ohreddit.jpg (62KB, 625x458px) Image search: [Google]
ohreddit.jpg
62KB, 625x458px
>>59509368

i just put some effort into it and i got it!
>>
>>59510082
he said circle not oval.
>>
>>59505884
Idea: You could use IPFS for the storage
>>
File: circle.png (42KB, 1606x699px) Image search: [Google]
circle.png
42KB, 1606x699px
>>59510209
>>
>>59510321
better
>>
Can anyone recommend me a good resource for learning more about the trie (not tree) data structure in C?

Working on a class project that implements the trie structure, but we never covered tries. The trie basically has to store words that appear on a web page and how many times the word appears on that page.

Anyone work with tries before and can point me to some good resources?
>>
File: nightTokyo.jpg (502KB, 800x450px) Image search: [Google]
nightTokyo.jpg
502KB, 800x450px
>>59505732
>tfw I'll never be a software dev in Japan
>>
>>59510638
https://en.wikipedia.org/wiki/Trie
>>
>>59510209
>he doesn't use an 8x8 font
>>
>>59505732
gonna try and make an implementation of Conway's Game of Life in python or java (I'm a beginner no murder pls)
>>
>>59510664
>good resource
>wikipedia
>>
>>59506840
what he's struggling with isn't java specific though

that's just general OOP shit

also, even though java may be shit, i still can't wrap my head around c++ so idk
>>
>>59510082
What kind of awful language is this supposed to be? There's so much meaningless punctuation, it's completely unreadable.
>>
>>59510864
I think rust but no promises
>>
>>59510321
Clearly not a circle.
>>
>>59510864
Rust's inconsistent parenthesis is an abomination
>>
>>59510934
They allow unbalanced parentheses?
>>
>>59510949
No
>>
Thread only for relevant programming languages and serious programmers:

>>59510936
>>
>>59510864
> meaningless punctuation
What did she mean by this?
>>
>>59510934
What do you mean?
>>
>>59510954
What awful thing do they allow?
>>
>>59510982
I'm not the guy claiming >>59510934
I'm curious what he actually means.
>>
>>59510949
>>59510969
No, i mean, none with for loops but then for expressions.
>>
>>59510994
Example?
>>
>>59510955
Hell is that?
>>
>>59511007
his circle>>59510082
>>
New thread:

>>59511080
>>59511080
>>59511080
Thread posts: 312
Thread images: 53


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

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


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