[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/dpt/ - daily programming thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 35
File: object-hierarchy.png (24 KB, 471x366) Image search: [Google]
object-hierarchy.png
24 KB, 471x366
git edition

old >>55375964
>>
>>55395402
First for D
>>
File: 1467570941060.jpg (517 KB, 1521x1076) Image search: [Google]
1467570941060.jpg
517 KB, 1521x1076
12 posts too early edition


What are you working on, /g/?
>>
Hey /dpt/, I was wondering what the best way to terminate a python application when a certain key combo is pressed would be?
>>
Fourth for Rust
>>
Fifth for Forth
>>
>>55395502
I'm the guy who wanted to write a scheme interpreter. I finished the lexer and parser, so I'll get to start designing the VM soon. If I implement unhygienic macros and quasiquotation then I'll still be able to implement many of the syntax keywords in terms of others, and I can make it available to players since I have a good idea of how to break the evaluation up into interpreter steps.
>>
why do weebs gather in these threads?
what's the relationship between coding and being a goddamn faggot?
>>
https://forum.dlang.org/thread/[email protected]

I mean, this guy does bring up some good points, but I find it funny he was butthurt enough to make an account just to post this entire rant.
>>
>>55395502
Animu indexer.

Wrote my own simple decoder for Usenet articles since the one I was using was shit. Also changed the design after an anon on the /wdg/ hugely helped me with the styling.
Hopefully tomorrow I can start downloading a few thousand images for the series I've indexed, then I can start working on a proper API.
>>
>>55395402
Please delete this pajeet thread.
>>
File: it's a trap.png (873 KB, 1275x677) Image search: [Google]
it's a trap.png
873 KB, 1275x677
>>55395854
calm down anon there's no point making a fuss at this point
old thread at 313 and we're 10 posts into this one
>>
So what do I do after learning the basics of a language?
>>
>>55395889
Is that language Haskell?
>>
>>55395782
Point 8 is cancer, he should be embarrassed of himself.
>>
>>55395929
It's nice that the D community is so normal and non-SJW that someone can go to their forum and post a dozen paragraph "your language is shit" thread without being banned

Much better than 4cha-
>>
>>55395921
I know the basics of c, c++, and python but don't know what to do now
>>
>>55395958
Unlearn Python
>>
File: Intro+to+Algorithms.png (244 KB, 607x681) Image search: [Google]
Intro+to+Algorithms.png
244 KB, 607x681
I need the solution manual to the 3rd edition of Intro to Algorithms. Anyone know where I can find it?
>>
>>55395958
Learn the new C++ standards, they are pretty interesting.
>>
File: emc%2B%2B%2Bfront%2Bcover[1].png (298 KB, 736x966) Image search: [Google]
emc%2B%2B%2Bfront%2Bcover[1].png
298 KB, 736x966
>>55395958
>>
I'm trying to grab a variable within a function within a class in python.

main file.
#!/usr/bin/env python

class Aclass():
def __init__(self):
self.returnPrint()

def returnPrint(self):
x=2
if x:
print("returnPrint function")
import second

Aclass()


imported file
#!/usr/bin/env python

h=__import__('__main__').Aclass.returnPrint

print(dir(h))


The imported file doesn't see the variable 'x' at all. How do I fix this?
>>
>>55395402
22th for Go is the best language/platform ever invented
>>
I'm making some simple stuff in PyAudio. I'm new to audio programming

How do you do real-time audio when you have this small buffer you have to constantly fill with a specified number of frames?

I tried setting up another bigger buffer but the audio thread keeps catching up and I get stuttering
>>
I was working my way through K&R and SICP last week, and finished all the exercises for the first chapter of each. Then got really lazy and did nothing this week. Want to change that tomorrow.
>>
Building a regular expression parser entirely in C.
So far it accepts ab, (a|b), a?, a*, a+,
I'm working on escape sequences and compound characters, e.g. "\d" or "[a-z]"
>>
>>55396114
Show code, senpai.
>>
I want to start getting used to .NET Core before work switches over to it - any ideas on console applications to start brushing up on it?
>>
>>55396029
Does python let you introspect a function to get the variables it uses? What kind of shit would that be? The variable x probably doesn't even exist until the function is run, and it will only exist until the function finishes and its environment is dead
>>
>>55395977
You can find it on google
>>
>>55396123
http://pastebin.com/RRRnEGeN
>>
>>55396160
Link? I can only find the 2nd edition solution manual.
>>
>>55396114
I hope you're using abstract algebraic structures like monoids and rigs for these expressions
>>
File: 1466390441961.png (319 KB, 850x683) Image search: [Google]
1466390441961.png
319 KB, 850x683
>code has been running for more than 3 days
Is this normal for you guys?
>>
>>55396196
>Abtract algebraic structures
>like monoids and rigs for these expressions
This is C, not haskell... I'm building a state automata because that way it matches expressions quickly.
>>
>>55396197
Sounds like it's working
>>
>>55396197
Yeah, that's about the average length of time for most programs
>>
>>55396196
If rngs are rings without identity, are rigs rings without nullification?
>>
>>55396221
>state automata
Are you perhaps using a monad for the state or a comonad for the automata?
>>
>>55396239
rigs are rings without negation
also called semirings
i.e. no additive inverse (and hence no subtraction)
>>
>>55396243
those haskellers trying to put math in everything amirite? xD
>>
>>55396257
Ok, thanks. I know about semirings, but never knew that they could be called rigs.
>>
>>55396179
Hmm cant seem to find it now. I do have it on my home computer though. Ill see if i can find it when i get bqck
>>
>>55396243
Did you did you not read the part about using C?
>>
>>55396280
>>55396265

I really wish Haskell were better for this sort of thing, you can't for instance represent laws or show that something is an instance in multiple ways, or really provide a generic instance for ADTs
>>
>>55396320
C is turing complete
Idris compiles to C
Step up your game


but it would be nice if C had HKTs
>>
>>55396257
>calling inverses "negation"
What is this debauchery?
>>
>>55396341
additive inverse is called negation
no idea where that could have come from

but an indian invented negative numbers
>>
>>55396364
similarly the multiplicative inverse function is often called reciprocation and represented as f(x) = 1/x = x^-1
>>
>>55396223
>>55396225
Thanks for the reassurance anons.
>>
>>55396400
What's your program doing? Finding primes or something?
>>
anyone have any experience with web scratchers?
how do i circumvent ajax?
>>
>>55396326
Want Haskell with dependent types?

"Multiple instances" usually means using records instead of typeclasses, since one of the advantages of typeclasses is exactly that there is at most one canonical instance. Things like Map rely on this coherence to avoid bugs like using a different ordering on different operations. If you wanted to be able to require these instances to satisfy laws, then you would need dependent types just as you would need with a single instance.
>>
>>55396400
it could be just throwing exceptions and populating a log file without you knowing though, had that happen before. ¯\_(ツ)_/¯
>>
>>55396418
There's an alternative, which is to allow defaulting and priority exactly the same way operator precedence works, and allow explicit choose of instances like in Idris, e.g.
fmap#{instName}


Alternatively if you could just have something like
instance Functor MyType where
fmap1 :: fmap
fmap1 = ...

fmap2 :: fmap
fmap2 = ...

someOtherThing :: fmap
someOtherThing = ...

default fmap to fmap1

And other things that rely on something being a functor and optimisations and such can use this
>>
File: based nigel.png (440 KB, 989x437) Image search: [Google]
based nigel.png
440 KB, 989x437
>>55396282
Please do. Thank you. Can any other anons find this? >>55395977 Also, check em.
>>
>>55395967
What do you mean by this? I'm learning Python as we speak. I might want to learn some C later.
>>
>>55396483
In these threads we only like obscure languages that no one actually uses for work.
If they have awful syntax and are verbose even better.
>>
>>55396145
last bump for this, sitting here idle. alternative is going outside
>>
File: 1448013225524.jpg (24 KB, 679x579) Image search: [Google]
1448013225524.jpg
24 KB, 679x579
How old is too old to learn programming?
>>
>>55396541
12
>>
>>55396522
I still don't understand.
>>
>>55396409
It's solving the 2D gap equations for the magnetic orderings in the graphene QHE edge states as a function of magnetic field. My 1D code took about 1.5-2 days to run.
>>
>>55396571
Well then you must be doing something wrong.
Mine took only about 5 minutes, I'd recommend you to shut it down and reexamine your code.
>>
File: 1446260397401.png (755 KB, 720x544) Image search: [Google]
1446260397401.png
755 KB, 720x544
>>55396648
Anon please
>>
>>55396571
What's it using to solve them? Logic or a genetic algorithm?
>>
>>55396834
Logic I believe. I derived the gap equations theoretically and then use a sort of root finding algorithm to find the orderings.
>>
>>55396878
What do the root algo's use?
Numeric or genetic?
>>
>>55396957
Numeric
>>
>>55396559
Sweet summer child, run away from this place before it's too late
>>
>>55396541
Never. Just buck up and read tutorials until it sinks in. It's just thinking and typing,
>>
>>55396969
Is there a reason it's taking so long?
>>
File: eaZrosc.png (363 KB, 5000x5000) Image search: [Google]
eaZrosc.png
363 KB, 5000x5000
tfw .net wageslave
>>
>>55397030
I'm using Mathematica if that's relevant
>>
>>55397034
but the pay is so high ;_;
>>
>>55397054
Well that might explain it

Try doing it in C or C++ and run it simultaneously
>>
>>55397102
Why does Mathematica run so slow senpai?
>>
(.=) :: MonadState s m => ASetter s s a b -> b -> m ()


>Replace the target of a Lens or all of the targets of a Setter or Traversal in our monadic state with a new value, irrespective of the old.

What did he mean by this, /g/?
>>
>>55397275
assign a new value
>>
>>55397381
But Haskell doesn't support assignment
>>
>Tfw programming is too hard to make a good application
>>
>>55397422
monadic side effects
>>
>>55397470
I don't know what that
>>
I have to create an ASP dotnet core webapp for school, but I dont feel like starting. It's a simple task but I hate dotnet. I just want to pull the strings, I dont want to be pulled by dotNet.
>>
>>55396541
Never, unless you are burned out cunt who doesn't care about learning completely new stuff.
>>
>>55396541
I started at 24, I was NEET the whole time, year and a half later, after spending almost 10-12 h a day every day literally on tutorials and books and doing projects, I am full time employed abroad in germany with starting salary close to 120k/year
>>
>>55396464
I guess with dependent types you could also put the instance that was used (in the Map example) in the type, and only allow things (e.g. intersection) with Map whatevers that used the same instance/implicit?
>>
Haskell has implicit parameters, now please stop trying to ruin typeclasses.
>>
>>55397585
Can't ruin what doesn't work
>>
A 3D cheese pizza MMORPG in WebGL. Gave up on looking for loli / shota models and just shortened and flattened the tits on adult ones lel
>>
First for Python is the fastest.
>>
>>55397622
why do you keep coming back
>>
>>55397631
Fastest runtime failures
>>
>>55397657
It gives me lots of attention and butthurt from autists
>>
>>55397505
This is very encouraging. Thank you
>>
>>55397631
Ya blew it
>>
>>55397631
>first
>91st post
No wonder you like Python.
>>
>>55397674
it's basically spam at this point
>>
>>55397505
>I am full time employed abroad in germany with starting salary close to 120k/year
How did you get the job? need advice please ;_;
>>
>>55397659
No, Python's runtime failures are pretty slow too
>>
>>55397608
Oh, which non-issue are you going to complain about, I wonder? Gee, I can't wait to have to pass everything around by hand, just like in Scala
>>
>>55397481
You should learn some of the common libraries/abstractions before trying lens, in this case State and MonadState. "MonadState s m" means that "m" is a type constructor such that the type "m a" represents some computation that conceptually has some kind of state of type "s" in the background, which can be used to compute the value, or may be changed by the value. Here is the basic "State" type constructor, which you can easily make MonadState instances for:
newtype State s a = S (s -> (a, s))


It is a function that takes the current state, and outputs the requested value, and also the new value of the state. You can "get" the state by just giving the passed-in state as the result, and you can "set" the state by returning the new state in the state part of the output.

If you don't Monad/Applicative/Functor etc., you should learn those, since they are standard APIs for lots of things in Haskell.

So basically, if you specialize MonadState to use State s, you get something like

asetter .= newval =
S \oldstate ->
((), oldstate & asetter .~ newval)


It takes the old state, and sets the things pointed to by asetter to the value requested.

There are other types that satisfy MonadState, notably monad transformers, but maybe you made a custom type that manually keeps its own state and you gave it a MonadState instance to let it work with existing libraries.
>>
>>55397690
it's more relevant to the thread than crying about what's being posted.
>>
>>55395799
Link?
>>
>>55397730
specialize .= to use State s*
>>
How should I parse IRC messages in C?
I want a lexical analyser/incremental parser with BNF syntax, but I'm unsure how to accomplish this.
>>
>>55397750
whatever
>>
>>55397715
>Oh, which non-issue are you going to complain about, I wonder? Gee, I can't wait to have to pass everything around by hand, just like in Scala
>>
Im working on something in C++ and I need to create a pop-up that I can style, nothing too fancy.

What's the preferred way to do that? Would be cool to just embed HTML
>>
>>55397762
don't pout on me bbygirl *pinches cheeks*
>>
>>55397784
Stylish headwear, my man! However, I feel it suits you more than it ever could me.
>>
>>55397761
send format: (NAME ARGS :string)
reply format: (:hostname NAME ARGS :string)
that's the format for most messages.
i made an irc server (https://github.com/agrecascino/TinyIRC/blob/master/main.cpp) that has a simple parser, so you could check out that.
>>
>>55397761
I did it with regexp and I regret nothing.
>>
>>55397792
Qt
>>
>>55397824
http://irchelp.org/irchelp/rfc/rfc.html is also the best thing ever for learning the protocol, and every message ends with '\r\n'.
>>
>>55397505
Wow, very inspiring. Did you also learn about algorithms & data structures? Or just pure coding?
>>
>>55397792
Either use Qt/QML or use Electron and write your code in C++ as a V8 module then invoke it from there.
>>
>>55397856
How the fuck do you want to get employed without the knowledge of data structures and algorithms?
>>
>>55395515
x=raw_input("enter 'c' to terminate the program.\n\n")

if x.lower()=="c":
exit()
>>
>>55397874
see
>>55355930
>>
>>55397895
Oh, right.
>>
>>55397874
Well I don't know, my boy. It twas just a question that I smittened. Nothing farce, nothing fast. Good day to you, my good sir.
>>
I have the following URL:

site/auth/logout

Is it completely ass-backwards to use DELETE instead of POST here?
>>
File: Intro+to+Algorithms.png (262 KB, 601x675) Image search: [Google]
Intro+to+Algorithms.png
262 KB, 601x675
Does anyone have the instructor's manual to Intro to Algorithms? I can't find it anywhere.
>>
>>55397920
DELETE (or possibly PUT) is better than POST here, because it tells the client that the action is idempotent and can be done multiple times (e.g. no "do you want to resend" prompt in browser).
>>
>>55395515
ctrl+c and catch the KeyboardInterrupt

>>55397886
>python 2.x
>>
>>55396021
Based Meyers
>>
>>55396029
>>55396151

first off, you have to actually instantiate the class. Meaning you have to assign it to a variable.

(this has to be in the file you run, not in your classes file)

Try doing the following instead of what you have now:

#!/usr/bin/env python
from folder import Aclass

myClass = Aclass()
print myClass.x

(for this to work you x = 2 has to be self.x = 2, that way you are setting Aclass's x attribute to be 2)
>>
>>55397935

It's in the gentoomen librrary
>>
>>55397856
actually, "coding" and programming language syntax was just 4-5 months at most, for several languages, when I just snapped and said to myself that this won't get me job, so I started learning patterns and algorithms mostly after that, and if I wanted to know something that I didn't about some lang or syntax concrete thing, I just google it.
>>
>>55398032
Only the 2nd edition, not the 3rd. Thanks though.
>>
>>55396197

Blame the library, call it a day.
>>
Scheme interpreter person here, I just realized that simple unhygienic macros wouldn't work even in very simple cases, like defining "let" in terms of "lambda", since lambda could be shadowed at the use site.
>>
>>55398083
I don't believe you Give us a sorting algorithm to sort an array in descending order without using one of the native Java libraries. GOOD LUCK NOOB

{3,1,6,3,7,1,6,4,2,6}
>>
>>55396541
Not sure, but I do know that it doesn't benefit to learn it during childhood.
I was learning C since about 12 years old, but I never understood it until I turned about 16-17 when my brain matured, and I'm still learning more even now at 19.
The important thing is that you develop a habit of programming.
>>
>>55398296
isSorted [] = True
isSorted [_] = True
isSorted (x:y:xs) | x < y -> isSorted xs
| otherwise -> False

sort x = (if (isSorted x) then id else (sort . shuffle)) x
>>
What country can you make the most money programming? How much less money would you make if you worked remotely (i.e., from home or you live in Thailand working on projects across the globe)? Would be nice to get my Bang cocked and make money.
>>
>>55398365
>shuffle
I M P U R E
>>
>>55398365
I said without using native libraries you have failed and therefore are a liar gg get rekt
>>
>>55397947
Good point, but what about cookies etc..?
>>
Is it difficult to compete with Pajeet's from Abu Dhabi or Chang Bong's from Chang Muay in the programming field? They'll work for $5/hr for H1B and have 3 Ph.D's from Balabala IT University, no?
>>
>>55398491
What about them?
>>
File: flag.webm (506 KB, 1366x768) Image search: [Google]
flag.webm
506 KB, 1366x768
not really programming, but I finished my screen-recording script and my flag-hunting script.

Anyone has the programming challenge roulette? I've started learning Ruby, but I don't really know what to make: the only noteworthy thing I've wrote was a 4chan catalog searcher.
>>
>>55398449
quicksort [] = []
quicksort (x:xs) = quicksort small ++ (x : quicksort large)
where small = [y | y <- xs, y <= x]
large = [y | y <- xs, y > x]
>>
>>55398510
Only Chang because they are the best programmers
>>
>>55398526
That's my question.

I'm a bit green on how to best/securely log people out. Visiting a link with GET is unsafe, but a POST with a token works better. Visiting that link will clear the current session for my user.
>>
File: image.jpg (12 KB, 474x473) Image search: [Google]
image.jpg
12 KB, 474x473
First for Haskell a shit
>>
Scheme interpreter guy again, I think I will use syntactical closure for the macro system, since they look not too hard to implement but still allow hygienic macros.
>>
>>55398649
it's breddy gud tbqh
>>
File: invaders.webm (634 KB, 828x352) Image search: [Google]
invaders.webm
634 KB, 828x352
Little invaders script

I wanted to have multiple invader characters but my code needs cleaning up first. It's really sloppy.
>>
File: file.png (84 KB, 1134x604) Image search: [Google]
file.png
84 KB, 1134x604
could I just have a tiny bit of help
been trying to figure this out for a while

what am I doing wrong here? I put this package in my build path and I can't seem to be able to import it
this is so bizarre
>>
>>55395774
>faggot
We don't speak about one another like that on this website, perhaps you got lost on your way to librechan.
>>
File: I_cant.jpg (241 KB, 1010x778) Image search: [Google]
I_cant.jpg
241 KB, 1010x778
>>55398838
Show me something done it for scientific computing that is actually useful.
Protip: you can't, because its a shit language for doing babby tier shit and to make you feel better by making you think you're smart.
>>
>>55398964
here is the package btw

https://github.com/kwhat/jnativehook/releases

and it says to import it through org but the jnativehook doesn't even show up under that
>>
>>55398979
you have to google this specific problem it is most likely conflicting java versions of java 8 and java 7
>>
>>55399022
ok I'll try that thanks
>>
>>55398964
I think it's because you need to add the .jar to your build path and instead you added the .zip file that probably contains the .jar file.
>>
Finally starting to look at graphics library options for the chip8 emulator.

This piece of code still feels obscenely ugly there has to be more I can do to clean it up. I might just be obsessing over it.

    fn load_rom (&mut self, path : &Path) -> Result<(), io::Error> {
let mut f = try!(File::open(&path));

let mut data = Vec::new();
let size = try!(f.read_to_end(&mut data));

if size > 3583 {
let err = Err(Error::new(ErrorKind::Other, "Rom too large"));
let ret: Result<(), io::Error> = err;
return ret;
}

let mut y = 0;
for x in data {
self.mem.ram[0x200 + y] = x;
y = y + 1;
}
println!("Size: {}", size);
Ok(())
}
>>
Im in a bit of a pickle. I need a function to run after a call back. The function is part of a class say func. I made the callback function a friend. But I cant call func from the call back.
>>
File: happy pepe.jpg (71 KB, 400x388) Image search: [Google]
happy pepe.jpg
71 KB, 400x388
>>55395502
>my oc reposted this soon
>>
>>55399272
>changes some text
>OC
>>
Programming god here, post your university or college programming assignments and I will help you with it
>>
File: mfw.jpg (58 KB, 528x792) Image search: [Google]
mfw.jpg
58 KB, 528x792
>>55399320
you're just jealous bc your oc is shit and no one posts it. pic related, more oc i made and i see posted around all the time
>>
File: 3.png (35 KB, 738x665) Image search: [Google]
3.png
35 KB, 738x665
how does google verify in less than a second, (prolly in a microsecond) if a google account exists?

Don't they have to hash it first, send to servers, ...

i'm really confused...
>>
>>55399368
Very powerful hardware and extremely efficient infrastructure
>>
>>55399368
That could be made by a simple regexp, your "email" doesn't even has an @, or a .com substring in it. So there's no even need to send it to the servers.
>>
What's the best language to write a simple text editor in?
>>
>>55395774
http://www.phauna.org/papers/anime/anime.pdf
of course, you're also on a website that was created for the sole purpose of discussing anime
>>55396464
which is essentially the use of modules to perform the work of a typeclass and then using some kind of modular implicit for the default case. with first-class modules and some structure for applying args implicitly (like "using" in Idris) you could pick what module to use for something like Map without having to specify which Map to use (forming a partially implicit functor). I think OCaml's modular implicits branch has some form of implicit functor that solves this problem but I have yet to look into it
>>
>>55399368
I think that Google especially is an expert in fast searching.
>>
>>55399390
google interprets what's behind the @ automatically, so if you type "john.doe" it'll interpret it as "[email protected]"
>>
>>55399434
Oh, you're right.
>>
>>55399390
If you vaildate emails by checking if they end with ".com", you need to stop.
>>
>>55399469
I was assuming the ".com" because it was gmail.
>>
>>55399481
You don't need a gmail address to have a google account, you can use any other email address at registration.

Also, gmail allows you to use a custom domain if you pay them.
>>
>>55398529
link for the mascot?
how do you have the qr like this?
>>
>>55399518
https://i.imgur.com/BxJylsO.png
(I've got grayscale mode enabled in oneechan)

set "autohide style" to "vertical tabbed" in oneechan
>>
>>55399535
Thank you anon. Also, you have a good taste for waifus.
>>
>>55399055
you were right by the way thanks
>>
>>55399544
Shiina isn't my waifu, Yui Yuigahama is. Still, Shiina's a bretty good girl.

It was in the default oneechan mascots, iirc.

Anyway, does anyone have the programming challenge roulette?
>>
>>55395402
can someone make a new thread with the bird with the knife in it's beak /g/ is so boring rn desu
>>
>>55399561
http://better-dpt-roll.github.io/
>>
What should I read after pic related? I'm thinking of The C++ version and finally moving onto books that aren't intros.
>>
>>55399084
>This piece of code still feels obscenely ugly
That's because it's Rust.
>>
>>55399640
What does the "t." actually means? (English is not my first language btw.)
>>
>>55397505
I started out by finding a well known university and discovering their calendar was open, with all the lectures, so I started taking CS.

The university taught mainly C so that's all I did combined with The Unix Programming Environment Book.

After 3 courses I had a solid understanding of
- data structures in C
- how C abstracts the memory model
- assembly in x64 (Linux/BSD).
- binary/floating point/ect.

That's not enough to program shit. The Unix Programming book however I learned to use awk/sed/grep and that actually landed my first job since I could prove I could slice through nasty log files.

While I was at that job I started doing microcorruption.com which is all in assembly. Aced that and used it as a resume to apply to a security corp which hired me as an intern now all my courses are through them.
>>
>>55399691
it's a meme from /pol/ by Finnish posters basically which means "signed".

t. meme magic programmer
>>
>>55399691
terveseit, polish for "signed"
>>
>>55399729
No, in Polish it would be "podpisano".
>>
>>55399764
It's Finnish
http://www.wordhippo.com/what-is/the-meaning-of/finnish-word-terveiset.html

Rgrds,
Terveseit,
- Internet
>>
is there a programmatic way to disable all keyboard output when caps lock is enabled? Was thinking of something that might consume the event and would rather not dig into the registry
>>
>>55399368
Probably a local database for each server that only contains usernames (and maybe password hashes & salts if you also put in a password) to verify the username quickly, then proceed with the actual login process.
>>
>>55399779
On Linux you could just use xbindkeys to call xinput
>>
>>55399687

Honestly it's not too bad in comparison to my previous C / C++ experiences.
>>
>>55398973
Dunno, I use it for prototyping or writing small scripts. I've implemented textbook RSA in it, which I suppose is scientific and useful in some way.
I'm not an expert with the language, but I enjoy writing it.
Maybe you should try having some fun with programming some time again too.
>>
File: Intro+to+Algorithms.png (270 KB, 589x662) Image search: [Google]
Intro+to+Algorithms.png
270 KB, 589x662
Does anyone have the instructor's manual to Intro to Algorithms 3rd edition?
>>
I made an optimizing brainfuck compiler.
http://pastebin.com/LqBwBGnJ
>>
When should I use something_t vs struct something in C? Is there any difference besides what's acceptable for the project at hand?

Curious because I see them intermixed in structs sometimes.
>>
>>55400214
Nice, have you thought of transpiling to C or LLVM, which may then be able to execute more optimizations?
>>
>>55400278
struct something a best
>>
>>55400302
I've thought of transpiling to C but that's too easy and boring.
I have not thought of transpiling to LLVM though, I might consider it one day.
>>
File: 1420500175412.jpg (438 KB, 900x2134) Image search: [Google]
1420500175412.jpg
438 KB, 900x2134
What should I be learning after getting a little dirty with languages and structures? I didn't study CS, but I would have at least double majored in it if I didn't take the compulsory CS so late. There's architecture, algorithms, databases, cybersecurity, networking, operating systems, compilers, optimization, etc. I studied pure maths and took OS and architecture as electives, but I don't really know where to go from there.

I feel like starting from 0 and moving up from there. Python and C++ seems like a good combo.
>>
>>55400438

Depends on the type of projects you intend on doing. Mathematically you'd be better off with a functional language. It expresses programs closer to what you're used to. You did work with lambda calculus right?
>>
Post /dpt/ related movies and documentaries
>>
>>55400528
I did not. My school is very weak and I'm not saying I'm above it, even with the graduate math courses, I still didn't cover a good portion of maths.
>>
>>55400528
>>55400583
Also, I don't think I'm picking up any other languages right now. I'm sticking with C++, Python, and the C covered in OS. On what I want to do? I have no idea. Helping the emulating scene would be neat, but that's way out of my scope.
>>
>>55400438
You should learn algorithms and data structures, then you should learn about the Communist takeover of CS.

>>55400528
Real math isn't a bunch of incoherent bullshit like """"functional"""" "languages" are. Being popular with SJWs and Communists doesn't make something bad, but you have to wonder why real mathematicians don't use it.

>>55400583
That's because "FP" isn't really math. It's fake math that's part of a failed Communist plot from the 1930s.
>>
can I overload glfw callbacks? I need a function to run which I dont really have access too from the callback. Particularly resizing the window.
>>
So I have kept statistics over events where I use math to prediect a value, let's call it x. The problem is that there is another variable in the data called y, which affects x in some way I don't know, other than knowing a value of y over 1 will exponentially make x lower. How would I go about making a formula for how y affects x, with the data I have? Do I just guess formulas by looping through different values in them and see which one comes the closest to the statistics?

send help
>>
Compilers: Principles, Techniques and Tools should be renamed to Compilers: You won't understand a damn thing without the two erratas for the book, Using proper names for variables in code snippets would literally kill us and Enjoy a completely ridiculous difficulty curve on the exercises
>>
>>55400046
I was aiming at machine learning, but apparently haskellers are too preoccupied with muh types and muh monadic uslessness than real applications. You're doing ok tho, programming in haskell for the joy of it, and not because "it makes me smart 3hard5you".
>>
File: download.jpg (6 KB, 190x265) Image search: [Google]
download.jpg
6 KB, 190x265
Going through this thing atm.
One thing that really bugs me about it is that it often gives me the (almost) correct answer with a really obvious flaw, then spends 2-3 pages confusing the fuck out of me by giving me obviously bad solutions until finally settling on the solution I thought it'd do from the get go...
>>
>>55400630

Well for the emulation scene you'll end up picking up a lot of information that is only used at the bare bones level (Op codes, chip interactions, etc) and a decent amount of parsing / compilation. It's not overly difficult project for the older systems (NES, Zx Spectrum, Chip8, Gameboy).

Just get used to data storage, basic logic operations, working with binary data, and loops. After that find and get comfortable with decent easy to use graphics / audio / input libraries (Make things like pong, picture viewers, etc). Then the final step is find all the information and data sheets you can on the system and model it in code.

I should probably mention that programming is a bigger bitch than advanced mathematics to learn
>>
>>55400583
he's memeing you, lambda calculus is an advanced topic that you wouldn't cover in a simple maths major
>>
File: Panic.gif (387 KB, 269x270) Image search: [Google]
Panic.gif
387 KB, 269x270
>>55400806
>I should probably mention that programming is a bigger bitch than advanced mathematics to learn
It can't be that bad.

>>55400810
>>
Is he right?

https://www.youtube.com/watch?v=5-4hV9x-EtY
>>
>>55400806

>programming is a bigger bitch than advanced mathematics to learn
Programming is easy
Programming emulators that use dynamic binary translation is hard.
>>
>>55400863
why did you quote me

if you're the guy I replied to, then never reply to me or my wife's son with an anime image ever again
>>
>>55400880

Learning to program would imply gaining some level of mastery (Complete mastery is a impossibility).

Learning to just churn out code to get shit done adequately is easy. Learning to actual make maintainable clean code and to start working on new materials that haven't been rehashed 1000 times over is a real bitch.
>>
File: Mashiro dancing.webm (3 MB, 720x405) Image search: [Google]
Mashiro dancing.webm
3 MB, 720x405
>>55400900
I'm sorry familia. I will never do it again, I promise.
>>
>>55400931
you can go fuck yourself, shitposter

why would you come in dpt asking questions while posting thread-ruining animeshit at the same time
>>
>>55400973
Anon, we can stop now. The only one that's ruining the thread is you.
>>
>>55400085
Am I in some weird hell where some one just keeps on asking this question?
>>
You're all fedorable.
>>
>>55401142

Nah, some desperate college student just wants to try and cheat on a shitty course that just has them do the problems in the book.
>>
JavaScript, Java, C++, and C# are all functional programming languages.
>>
reminder that underscores > camelcase
>>
>>55400788
>the machine learning meme
kys
>>
>>55401296
I'm not sure if this is post ironic general posting or unironic ironic shitposting.

[spoiler]I hope it wasn't because I'm learning them.
>>
>>55401298
No, they require more keystrokes.
>>
>>55401327
They all have functions as first class values.
>>
File: ec0936fe7f.jpg (10 KB, 333x57) Image search: [Google]
ec0936fe7f.jpg
10 KB, 333x57
>>55395402
Just added a ctrl + shift + m command to toggle between the main player and mini player.

>>55401329
This desu.
>>
>>55401281
Gods, what a shitty course.
>>
>>55398886

Someone rate my webm I need replies
>>
File: Me with Chester.jpg (13 KB, 236x335) Image search: [Google]
Me with Chester.jpg
13 KB, 236x335
>>55401142
>>55401281
No. I learn from doing the end of chapter problems. I'm not in school. I'm trying to teach myself programming. Now, if either of you kind gentlemen would kindly assist in my fruitful endeavor, I would be ever gracious at your generosity. Good day, Sirs.
>>
>>55401383
Why not just buy a copy
>>
>>55401395
>Why not just buy a copy

>Instructor's copy
>buying a copy

Well, I don't have a Ph.D, so they won't sell me one.
>>
>>55401383
I'm pretty sure someone already answered your question. I'm not going to spend my time to look for the book, so if you can't find it, you might have to buy it or rent it.
>>
File: 1466735226708.jpg (35 KB, 564x428) Image search: [Google]
1466735226708.jpg
35 KB, 564x428
Where do I even start. I'm learning JS ok but I just feel like there's a shit ton of stuff I'm not learning.
>>
>>55401426
JS is a good start. You'll get there. Just take a bunch of tutorials, you can end up like this guy >>55397505
>>
File: 1466554161105.jpg (99 KB, 426x640) Image search: [Google]
1466554161105.jpg
99 KB, 426x640
>>55401420
>Rent book at school.
>Scan all 800 pages
>Return it the next day for a full refund.
Fucking nerds didn't know what hit them.

When I was getting my books for med school I made the stupid choice of buying them instead of looking online, where they had them free.
>>
>>55401415

Is this not what you're looking for?

http://computerju.com/Materials/Algorithms/Introduction%20to%20Algorithms%20Instructor%20Manual.pdf

I've never read Intro to Algorithms so idk if this is right but that was the second search result for instructors manual
>>
>>55401426
If you wanna be a natty programmer, learn C, then move to a higher level language. (After grasping the basic concepts).
>>
>>55401426
You're not going to learn everything in one go. If there was a course that did that, most people would give up. What do you feel you're missing?
>>
>>55401420
Don't learn JavaScript, learn Agda first
>>
I took two semesters of Java, a class on discrete mathematics, and a class on computer organization.

What do I do? I have no idea what to make. I want to make something. Or contribute to something. What do I do?
>>
>>55401462
Command line blackjack and poker

Add networking for multiplayer
>>
>>55401448
Yup, I would also suggest he gets the book from their school if they're enrolled. But since they want the answers on a silver plate, there's nothing we can do. I checked too, out of curiosity, but someone already adequately answers his question.
>>
>>55401426
Don't learn JS, learn Agda first
>>
>>55401365
Would be pretty baller to create an image based on that, to use it as a wallpaper.
>>
>>55401486
Nope, I would suggest C0.
>>
>>55401502
Let's compromise and use Coq
>>
File: Sir Anon with Gregory.jpg (176 KB, 313x510) Image search: [Google]
Sir Anon with Gregory.jpg
176 KB, 313x510
>>55401449
Thank you, young squire. But as another posted, this is the 2nd edition, in which I haven't an interest. Should you come across the 3rd edition, it would be highly desirable by me.

Graciously,

Lord Anon of Anonbury
>>
>>55401446
>>55401454
Thanks man, I don't want to be rich I just want to be able to make a standard 40k a year.

>>55401455
I'm not sure, but I just know I'm missing something, I feel like I'm learning multiplication before addition. Even though JS is pretty simple.
>>
>>55401520
Thou art but a slimy toad. Thou runnest amok in this thread, and we shall brook no further insolence. Begone, pitiful begging knave!
>>
>>55401530

Nearly half of college graduates are being forced into jobs that don't require a degree. There are projections saying there will probably be a big global crash / collapse of the economy. You're expecting to get a $40k year job in this environment?

If you're lucky it can happen.
>>
>>55401608

Oh and I should note that in most major cities $40 k a year is enough to be full on poverty or bordering it.
Thread replies: 255
Thread images: 35

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.