lainchan / λ

The Beginner's General

Drifter · 2018-11-06 09:32
Procedural Programming Object Oriented Programming Functional Programming Data Oriented Design What do all these terms mean and which one should I use? I've briefly looked into it and for some reason the Functional Programming seems really cool to me. Which one are you using?
The Fin · 2018-11-06 09:59
Maybe read the Wikipedia entries for each. My preferred aapproach is a functional, data oriented design. Functionality and data orientation go hand in hand, as you're jjustvapplying transforms to input data to produce output data
Jim Hilger · 2018-11-06 12:08
>>11241 Can I use Functional Programming effectively in a programming language that is not strongly designed around the functional approach?
Dozer · 2018-11-06 12:15
They're useful in different scenarios and it will be of great benefit to learn them all. Religiously adhering to one paradigm will only end in frustration and is ultimately futile since it's possible to implement an object oriented system in FP and vice versa through convoluted means.
Chani · 2018-11-06 13:37
depends on what you want. Functional is considered a little ivory tower and academic, and can have problems with mutable data structures. Object Oriented is sometimes considered bloated and overly complex in a non-mathematical, non-academic way but is widely used. Procedural is the basis for all paradigms, and functional programming is procedural programming. Object oriented is procedural programming. You decompose complex processes into compact well defined procedures that return control flow to their caller. Before procedural programming, you might have just had jumps and goto.
λx.x · 2018-11-06 16:15
This is the Beginner's General for beginners' questions. If you have a simple question and a suitable thread doesn't already exist, just post it here and someone will probably try to answer it for you. Remember to do some research before asking your question. No one wants to answer a question that a simple search can already resolve.
Tequila · 2018-11-06 16:46
>>11248 I want to go deeply into studying algorithms and data structures, what math courses should i consider to to take? full list plz.
vector · 2018-11-06 16:56
>>11250 None. Begin studying data structures and algorithms and see what you need. To get started , none. Formally? You probably want discrete sums, combinatorics, order of (big omega notation , etc), series and other discrete mathematics. But if you want the ability to implement algorithims, and have a working understanding of algorithms, go implement some algorithms and data structures.
Zero Cool · 2018-11-08 06:11
>>11250
nibble · 2018-11-09 17:57
progn · 2018-11-09 18:20
>>11283 These two are excellent books for brushing up on mathematical logic, data structures, and algorithms. Learn how to divide your standard daily actions into nodes in a graph, then, optimize efficiency by cutting certain links out and turning it into a more limited outcome sequential action tree, reducing free will, but increasing order and productivity.
stack · 2018-11-11 10:04
is learning Theory of Computation (the Automata theory and etc) as a beginner? I have learned recursion and stack from The Little Schemer and some little Lambda Calculus. I now have a huge intuition about computations, but I dont know if I should go learn Imperative Language or proceed with SICP, HtDP, and Theory of Computation. thank you...
John Doe · 2018-11-11 13:58
>>11310 The Seasoned Schemer could come next.
Spike Spiegel · 2018-11-11 21:47
Nguoi La · 2018-11-11 22:17
Daily reminder that PDFs might be shared on https://volafile.org/r/kUFzLJ
fsociety · 2018-11-12 13:27
i apologize if this is off topic, and if it bothers you guys, pls delet im just poking my head in here to see if you guys know if the lainposter who made the fuarrrkjewtube script is ok. i noticed his site got claimed about a week ago, and he hasnt posted on his board on 8 in about two weeks. i understand if hes laying low, and obviously dont want to compromise his whereabouts, im just hoping to hear that hes still alive and didnt get shoah'd we all luv u lain pls stay saef
Technician · 2018-11-12 15:42
i feel angry when i see someone uses json columns in database, almost i cant breath, arent they just storing data? am i missing something? why are they storing as json instead of relation? is it faster?
Dozer · 2018-11-12 16:19
Is there a online bootcamp or course where I can learn webdev and do a lot of projects or contribute to open source lain? I've tried 3 courses on udemy and everytime I finally get to do a project on my own I feel lost because up until then I was copy/pasting the instructors code so I never end up retaining much of the information.
Pulse · 2018-11-12 16:33
>>11327 psql has good json functions, which make it a lot more efficent. If you have to do selects/queries based on them, or update them, then it's terrible, violates first normal form, etc... But if you're just storing blobs of data that you're going to regurgitate to some other service at some point in the future, and never decode, it seems like the smarter option to me.
Batou · 2018-11-14 01:45
>>11328 I suggest you do some projects and upload them to Neocities. If you want to do something but doesn’t know where to start, ping us and we’ll direct you (what to search for...)
Elliot Alderson · 2018-11-14 09:00
I would like to pick up C. I've done programming in the past but it's been a while. I would also prefer a "modern" approach to learning C. Additionally, I would like to learn more than the language. I'm interested in learning about tools to utilize alongside it. Version control, debuggers, soykaf like that. My problem is not that I can't find resources on my own, but that I am overloaded by the sheer amount of information and lack the understanding necessary to understand what's good and what's bullsoykaf. Are there any sources of information that are known to be worthwhile?
Chani · 2018-11-14 10:58
>>11363 https://matt.sh/howto-c
t · 2018-11-14 11:01
>>11363
The Phantom Phreak · 2018-11-14 11:03
>>11363 Part 2: check volafile for wHacking, the art of exploitation and 21st century C
typedef · 2018-11-15 02:30
For everyday non-web use like scripts, fiddling with Linux utils, etc... Do you recommend me to learn c? Does it really give a better understanding of the fundamentals? What else wou!d you say will be also nice to know for desktop usage?
Zero Cool · 2018-11-15 03:34
>>11375 Unironically yes. You'll have a better understanding of fundamentals, AND it's practical, AND you'll be able to pick up dozens of modern languages without a hitch (and without misunderstanding what goes on underneath the hood). Everything is impossibly fast and odds are any library you need is out there and has been refined by loving experts for decades.
sizeof · 2018-11-15 05:46
>>11366 the entry level for this book is too high for someone wanting to learn. >>11375 >fiddling with Linux utils given that most of them are still written in C it isn't the worst idea. >scripts learn shell, sed, awk, etc. >Does it really give a better understanding of the fundamentals? what fundamentals do you mean? OS? programming? >What else wou!d you say will be also nice to know for desktop usage? as you understand Unix better you will find yourself needing desktop features less
if · 2018-11-15 08:10
>>11363 I found the K&R book that usually gets recommended to be more useful as a reference than an exploration of C. It's worth getting as a supplement though. I enjoyed working through C Programming: A Modern Approach. It teaches everything from the ground up, including the history of the language, and its simple diagrams and explanations for how memory management and pointers work were beginner friendly. The book also introduces some basic data structures and how they're implemented in C. Without any former experience in C it took me about two weeks to casually work through the book and do the exercises. As far as tools go, I've found Valgrind and GDB to be most useful. Valgrind helps you find mistakes in how you manage memory. GDB lets you step through your code. There may be other tools people use but these are the most widely used. While not important when you're starting off, eventually you'll be exposed to Makefiles. As each C file requires compilation and linking, rules need to be defined coordinating how this is done. Makefiles define these rules. You can learn this anywhere as you go. Version control is simple to learn. I would recommend Git. You can learn the basics anywhere but when you're comfortable creating a repository, making commits and handling branches you might want to visit the free book Pro Git. When you're feeling confident it's worth taking a look at https://www.ops-class.org. It's a class on operating systems and will give you the opportunity to build something with C, use GDB, understand Makefiles, and use version control. It's very similar to the class I took for my undergraduate. There are lots of resources out there and it's just as overwhelming for a veteran as it is for a beginner. If you worry about finding the "best" resource you'll be stuck forever. Just get started with whatever you can.
Anamika · 2018-11-15 08:18
>>11376 I disagree. >>11375 Using Linux provides you with very little exposure to C. Even on source-based distributions you only need a vague understanding of how compilation works. Having the background knowledge makes some things easier to understand but its almost never a prerequisite. I would expect a good knowledge of bash to be more useful. If you're interested in the language however, go for it.
Backus · 2018-11-15 14:28
Well relational databases have their own cons. So it depends on what exactly is your use for that database
Roy Batty · 2018-11-15 23:17
is there any good sets of tutorial or practical example driven book concerning CV? I always wanted to build my own surveillance system with my laptop camera but random online tutorials only got me so far as face recognition. Like, if I want to observe my neighboring apartment by counting how many lights are up at given time period what kind of filter should I consider? etc
Apoc · 2018-11-16 00:07
>>11379 Yes, maybe what I want is a better understanding of *nix in general. C is just a way to know its tools. Do have any book in mind to start? I've been reading a lot about init systems lately, for example. Maybe you can recommend me some resources.
The Phantom Phreak · 2018-11-16 00:08
>>11384 >Using Linux provides you with very little exposure to C the stupidest thing Ive ever seen on this board the Linux API is nothing but C sys calls
Guthrie · 2018-11-16 00:12
>>11394 >Do have any book in mind to start? <not who youre quoting> The two most authoritative Linux programming books are "The Linux Programming Interface" by Kerrisk and "Advanced Programming in the Unix Environment" by Stevens and Rago
Stallman · 2018-11-16 11:27
>>11396 Gonna check that out, thank you. Also, I saw someone post a Operating System online class, I'm gonna review it later as well.
Donna Hawthorne · 2018-11-18 19:23
I want to start learning about coding bots, for now at least very simple ones to use with binance (crypto trading), my question is, should i go with python or js + node? I've seen that people rather use python, but im nore interested in node+js but i dont know if it will do the job (graphic calculation) sure, there will be frameworks but i also dont want to hardcode everything. Thx for the help chums
Jet Black · 2018-11-18 22:36
>>11441 It will do the job. Now Python seems simpler to start of with in terms of internet resources. But go with node if you like node that’s my advice here.
Void · 2018-11-18 23:02
>>11444 I dont mind wich one is simplier, i have the whole time of the world to learn, and already have some knowledge on js
Switch · 2018-11-19 14:04
>>11445 Then go for it lain
Neo · 2018-11-22 05:24
https://functionalcs.github.io/curriculum/#sec-1-1 How is this for a self study cs course for a future aspiring EE major? Is it overkill, is the choice of material bad, or is the material out of order in any way? Honest beginner looking for honest feedback. Thank you for your time in advance.
Jean Dupont · 2018-11-22 06:00
>>11495 ``Common Lisp - A Gentle Introduction to Symbolic Computation'' is a fantastic choice for someone with no programming experience. You start off ""programming"" on paper for the first 2 chapters, introducing you to the concept of abstracting with functions. You go through the book learning how to break down problems little by little as there's hundreds of exercises for you to practice your knowledge on. You learn about functions as data, recursion, data structures, and even a little bit of macros. I have a physical copy because I enjoyed it so much. The link lists PAIP and ``On Lisp'' as sequels and I'm going down that road though I'm having a little detour reading ``Practical Common Lisp'' I doubt you need everything this page lists but I'd start reading/watching/learning what interests you. This seems like a great selection of resources for various topics. Don't be afraid to jump right in with something.
Koichiro · 2018-11-25 07:12
We have: (λxyz.xz(yz))(λmn.m)(λp.p) Expanded out: (λx.λy.λz.xz(yz))(λm.λn.m)(λp.p) Outer x is reduced: (λy.λz.(λm.λn.m)z(yz))(λp.p) Next, outer y: λz.(λm.λn.m)(z)((λp.p)z) The book I'm reading now says at this part in the reduction, that z is irreducible because it has no argument to apply to. But I'm kind of confused here, something isn't clear in my understanding of beta reduction and arguments, can't the term ((λp.p)z) be used as an argument to z, or is that considered part of the body of the expression? I apologize if my usage of terms isn't correct, quite new to lambda calculus and clearly I'm confused about something. If someone could perhaps explain a bit to me, I'd appreciate it.
Jim Hilger · 2018-11-25 11:52
>>11525 >λz.(λm.λn.m)(z)((λp.p)z) >can't the term ((λp.p)z) be used as an argument to z, or is that considered part of the body of the expression? The term ((λp.p)z) is one level too deep in the parse tree to allow the beta reduction of z. It is the second argument to (λm.λn.m). For beta reduction you need (λz.E)F which becomes E[z:=F], but in your case ((λp.p)z) is inside E, and there is no F. You can still proceed with inner beta reductions on both the inner identity function and on the first projection, to reduce the overall expression to the identity function.
Ivan Horvat · 2018-11-25 12:14
>>11525 >>11528 Write closing parenthesis
Nguoi La · 2018-11-26 15:39
in SICP (chapter 1), it says in the General Evaluation rule is 1. Evaluate the subexpressions 2. Apply the leftmost subexpression (which is the operator) to the arguments (operands). lets say we have (+ (* 2 5) (- 9 3)), so the interpreter will evaluate first the subexpressions which is the "+", (* 2 5) and (- 9 3)..... then what is the next step? would the interpreter applies the "+" first? or the interpreter will solve the (* 2 5) and (- 9 3)... Im just beginning reading SICP and I haven't read the EVAL/APPLY wizardry yet
Roger Pollack · 2018-11-26 16:44
>>11539 (+ (* 2 5) (- 9 3)) 1. Evaluate +, it gives the procedure associated with + 2. Evaluate, in the same manner the actual arguments 3. Apply 10 and 6 to +, get 16
Shogun · 2018-11-26 18:59
I have written a bash script that checks if my arch laptop is connected to my home network. I would like to have this script ran every time I connect to a network. I think I'm supposed to drop this script in some specific directory but I am too much of a fool to gather this info from archwiki or google.
Joey · 2018-11-26 20:17
>>11541 I would just run it periodically.
The Plague · 2018-11-27 00:14
>>11539 Scheme uses applicative order evaluation, so subexpressions are fully evaluated before the operator is applied. While the rule for evaluating combinations is presented in 1.1.3 [1], the finer point of evaluation order is delayed until the second part of 1.1.5 "Applicative order versus normal order" [2]. Do not skip Exercise 1.5 [3]. [1] https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1.3 [2] https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-10.html#%_sec_Temp_22 [3] https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-10.html#%_thm_1.5
Frank Garza · 2018-11-27 00:42
>>11541 >I would like to have this script ran every time I connect to a network. >I think I'm supposed to drop this script in some specific directory If you are using NetworkManager the directory is /etc/NetworkManager/dispatcher.d and the action is connectivity-change. See the "Dispatcher scripts" section at: https://developer.gnome.org/NetworkManager/stable/NetworkManager.html
Unnamed · 2018-11-27 10:14
>>11545 This is exactly what I was looking for. Thanks.
over · 2018-11-28 01:08
>>11497 Thank you. I started doing that book and that math websites kind of weird so i started with basic mathematics from serge lang. Wish me luck
Nemissa · 2018-11-28 11:14
>>11540 >>11543 I dont get what "evaluation" or "apply" it is saying. (+ (* 2 5) (- 9 3))... I mean, we should recur on the subexpression if it is also a combination right? so: 1. Evaluate all subexpressions its "+", (* 2 5), (- 9 3).. (and the operator would be evaluated as its value defined in the environment or built-ins), but since the subexpressions are combinations, next is 2. Evalute subexpression of (* 2 5), and apply its operator, then recur and recur until we get the final result am I right?
() · 2018-11-28 14:39
>>11557 Yes you are
bit · 2018-12-01 02:07
Hi lainons, I need some help with haskell. I'm trying to make a simulation of a queue in a bank, or supermarket or whatever, it is a queue of people. the definition goes like this: data PersonArrives = No | Yes TimeOfArrival TimeOfAttendance deriving(Eq,Show,Ord) type TimeOfArrival = Int type TimeOfAttendance = Int data PersonExits = None |Exited TimeOfArrival TimeOfWait TimeOfAttendance deriving(Eq,Show,Ord) type TimeOfWait = Int type QueueState = [PersonArrives] Basically, The queue is a list of persons, with their time of arrival, and time necessary to be attended. So, inserting these people in a list isn't that hard: addPerson:: PersonArrives -> QueueState -> QueueState addPerson p q |p == No = q |otherwise = (p:q) If they arrived, just put them in the queue, right? But it gets way more complicated when i have to process the queue: processQueue :: QueueState -> (QueueState, [PersonExits]) that part above I have no idea how to start. To give you an example how i need it to operate: lest suppose we made a queue like this: [Yes 0 10, Yes 0 20, Yes 0 30] the first person to be attended will be the last one of that list, in this case "Yes 0 30" applying processQueue in this queue would need to return something like this: processQueue [Yes 0 10, Yes 0 20, Yes 0 30] > ([ ], [Exited 0 0 30, Exited 0 30 20, Exited 0 50 10]) What i need you to notice is that the time of wait of the person that exits the queue is equal the sum of the time of attendance of all other people that exited firstly. I've only managed to free a person when no one else exited already: freePerson :: PersonArrives-> [PersonExits] -> PersonExits freePerson (Yes time_c time_a) [] = Exited time_c 0 time_a don't know much far from here. I need help.
Ishikura "Tatsu" Tatsuhiko · 2018-12-01 12:30
>>11610 >processQueue :: QueueState -> (QueueState, [PersonExits]) >processQueue [Yes 0 10, Yes 0 20, Yes 0 30] >([ ], [Exited 0 0 30, Exited 0 30 20, Exited 0 50 10]) What is the purpose of the first output component if the queue is always emptied? >freePerson :: PersonArrives-> [PersonExits] -> PersonExits >freePerson (Yes time_c time_a) [] = Exited time_c 0 time_a Add a parameter that is the time when the cashier became available. Use a fold with as many list reversals as your preferred input and output orders require. For the fold step, if the next person was already there when the cashier became available, the wait time is cashier_free - arrival and the cashier_free increments by your TimeOfAttendance. If the next person arrives after cashier_free the wait time is zero and cashier_free becomes arrival + TimeOfAttendance.
Roger Pollack · 2018-12-04 11:07
Why people put Linux into apple machines? What are the benefits?
Project 2501 · 2018-12-04 19:26
>>11328 In my experience online courses are not as helpful as official documents, books, and taking what you learn from those (and their exercises), and doing personal project with them. Online courses tend to be too lacking in detail and foundational concepts in my experience. They teach you through examples, where you learn some API methods, some base concepts, etc., but really they just give you a high level overview, which is not enough to have a strong grasp on the foundations of the language on the concepts of programming. I also just started recently learning web dev, sick of being in glorified support jobs, like the NOC, where I just run premade firmware update scripts all day and call our server hosts to act as a middle man at all hours of the day. Here are the books and resources I'm learning from as of now: -CSS & HTML MDN web dev guide (primary) -HTML and CSS: Design and Build Websites (2011, 1st) (secondary) -Eloquent JavaScript: A Modern Introduction to Programming (2018, 3rd) (primary for now) -Professional JavaScript for Web Developers (2012, 3rd) -Python Crash Course: A Hands-On, Project-Based Introduction to Programming (2015, 1st) -Automate the Boring Stuff with Python: Practical Programming for Total Beginners (2015, 1st) -Learn Python 3 the Hard Way (2018, 1st) (already own) And here is the site I made to track my progress, do daily practice work on, and post projects on: https://cryptolain.github.io/
Pulse · 2018-12-05 22:55
Is there a efficient way to read data from a website and save it in a file using C++? I've worke with files in C before but it was everything too basic and I've never used C++ with anything related to internet.
Technician · 2018-12-07 09:35
me looking for a new language to learn something like haskell or elrang but the problem is whats the purpose of these languages? its not like 4 people sits in room and says each other "let's create a language and call it haskell", why did they need these languages? there is already many general purpose languages, whats the point i am missing? i always feel guilty when i have to use reflection to solve problem because that means i did something wrong in past so now i have no time to rethink about it and just hoping to learning new languages will remove this guilty feel.
Stallman · 2018-12-07 10:34
I have no idea what you really want but might i suggest racket(http://racket-lang.org). Its multi paradigm but mostly build up on functional concepts, it also has a lot of libraries that can be easely and quickly be used.
Masami Eiri · 2018-12-07 19:46
>>11714 In the case of Haskell they thought functional programming was the way to go but other pre-existing functional languages didn't do it correctly. For Erlang much the same, except their focus rather than functional programming was concurrency. Sort of "what if we create a programming language entirely around the idea of concurrency?" Perhaps rather than learning any specific language you'd do better to study for a while the ideas and concepts of programming language theory I guess you'd call it, in order to better understand the various abstractions and paradigms then choose specific languages in order to further explore said ideas.
Guthrie · 2018-12-09 08:06
>>11714 Technically speaking, C++ is a general purpose language. If its use cases therefore nominally cover those of Erlang, why don't we use C++ instead of Erlang? Erlang is made for one thing and one thing only - highly reliable and available soft real-time distributed systems. It is known for achieving 9 9s of reliability (99.9999999% uptime, or only a few milliseconds of downtime a year, tops) because of these "weird features". See how far you can get with that in C++ before you segfault. Even if you did miraculously get it to work, it would be very rickety. If we let C++ programmers rewrite the Internet's infrastructure, there wouldn't be an Internet. Erlang programs are made up of isolated actors which pass messages, much the same as how cells in your body isolate their details and communicate by releasing chemicals which may or may not be detected [1]. When an actor fails, it lets the other know so they can replace it automatically, leading to never-failing systems. One can add new actors to an already-running system because they're not codependent; all they can do is pass messages, which may be ignored because the receiver decides what to do with them. It isn't by chance that 90% of Internet traffic passes through an Erlang-controlled node [2]. Procedural programming just doesn't work for this! Languages such as Erlang are to "general purpose" (read: equally neutered in every way) Algol derivatives as the Algol derivatives are to assembly. There was a time when people asked "why would we need anything other than assembly?". You'd rattle off the benefits of your favorite language in a heartbeat! How could anyone program in something so primitive? To them, however, assembly is good enough, and they can't fathom what other languages do better. They must be the same, but with weird characters and syntactic sugar for newbies, right? Well, the way you look at unrepentant assembly addicts is how Lisp and Haskell and Erlang programmers look at you, except for that they know to restrain their hubris and take a deeper look before dismissing the unfamiliar. tl;dr stop being a Blub[3] programmer. [1] This idea, of basing was the original idea behind OOP (which has nothing to do with C++/Java classes; classes are just poorly-designed modules). See: http://worrydream.com/EarlyHistoryOfSmalltalk/ Erlang's creator, Joe Armstrong, famously dissed what's commonly referred to as OOP (what you see in C++ and derivatives), but later backtracked when he learned the real story and stated that Erlang is the only object-oriented language today. It's certainly the only one that's used AFAIK. [2] https://web.archive.org/web/20180602100220/https:/twitter.com/guieevc/status/1002494428748140544 [3] http://www.paulgraham.com/avg.html
Kay · 2018-12-11 05:12
>>11714 >its not like 4 people sits in room and says each other "let's create a language and call it haskell" actually this isn't too far from the truth. https://www.youtube.com/watch?v=06x8Wf2r2Mc the associated paper might answer some of your questions too.
Incognito · 2018-12-12 11:26
I have a question. What is the best way to terminate a program writen in C (or C++) because of a error? Should I call some function that free all the memory (and close all the open files) in a program and then calls exit() or maybe I should return a error in a function that caused the problem keep returning error until I finally reach the main() function (freeing the memory as I go up a level, if needed)? The second method could easy create spaghetii code while the first method (when I would call the shutdown all procedure) would need to include calls to almost all parts of the code (and I'm not sure is that any better as I think it breakes the encapsulation of some modules and requires me to modify this shutdown all procedure each time I add a new module to a program). Sorry for a vague description but I'm still on a phase of designing and just want to plan this the best I can.
Leto Atreides I · 2018-12-12 19:22
>>11766 C++ has exceptions. Throwing inside of an object's method calls its destructor automatically and cleans up for you. The only catch (no pun intended) is that a destructor cannot throw an error. In C, the accepted way is to return an error code (0 in the case of success, a number otherwise which indicates which error).
Appleman1234 · 2018-12-12 19:56
>>11766 There isn't really a best way, without specifying criteria. You have several options. For C++ std::expected (https://github.com/TartanLlama/expected , standards proposal pending) is nicer than exceptions which with RAII are nicer than error codes, assuming you can take the performance penalty for using exceptions for your use case. For C there are various strategies , some of which are listed in the attached PDF To answer your question, in C you should use a combination the two strategies and look at atexit for the first strategy and also be aware of the caveats of errno and numeric handling for the second strategy.
Netrunner · 2018-12-13 09:39
>>11772 I think that the atexit function described in this PDF was what I was looking for. Thanks!
Unidentified · 2018-12-13 22:06
Are these specs enough to start programming in python ? And is it possible to uninstall Ubuntu Linux and install Windows 10 ?
Nobody important · 2018-12-14 04:27
>>11788 You forgot the specs, but the answer is yes. You can learn to program on anything, it's one of the least resource intensive things you can do with a computer.
Meddler · 2018-12-14 15:50
>>11794 I posted reply
Terzibashjian · 2018-12-17 12:02
anyone here have a complete copy of the book "Introduction to the Theory of Computation" by Michael Sipser because all pdf's online are incomplete. Ive been watching a course of Theory of Computation from some Indian youtube channel, though good, but I feel its not quite enough.
nibble · 2018-12-18 17:48
scanf() feels like cheating almost. I didnt know of it before my simple chat program was almost done. Yes, i made a chat program using only getch().
hash table · 2018-12-19 12:57
Does anyone know about the Exercise 1.13 in SICP which is all about the Golden Ratio. I'm not good at math, and I can't even get what the exercise was asking for.
Miho Iwakura · 2018-12-19 16:06
Intro: 32, taught myself programming after a series of blue collar jobs, did a programming boot camp, lack the background and knowledge base of a CS degree, live in a rural area. How do I sell this to a company? I have 3 years experience at an entry level job, but they let me know because of my background the company would not let me move up. How can I take a self taught knowledge of Java, JS, C#, and LISP/Schem, and make it into something anyone would want to hire? Second cheater question: I'm terribly uncreative and shy, what's a good way to get over this and work on some sort of collaborative or open source project as a low level gruntman?
Moore · 2018-12-19 16:26
I remember getting stuck on this one as well. What you need to show is that fib(n) is a decent approximation of (((1 + sqrt[5]) / 2) ^ n) - ((1 - sqrt[5]) / 2) ^ n)) / sqrt[5] so just calculate these two values and show that they're pretty close (either by subtracting one from the other and showing it's a small number or by just printing both). If you need help with how to get there as well I've got a old copy of the program I used for this.
Koichiro · 2018-12-19 16:46
>>11827 forgot to >>11825
Apoc · 2018-12-19 21:37
>>11825 >Exercise 1.13 in SICP https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-11.html#%_thm_1.13 GR = (1 + sqrt (5)) / 2 notGR = (1 - sqrt (5)) / 2 Show: Fib (n) = round (GR ^ n / sqrt (5)) Hint: Fib (n) = (GR ^ n - notGR ^ n) / sqrt (5) 1. Assume you have proven the hint. Compare the hint and the target. View them as round (X) = X - Y Convince yourself that this follows from abs (Y) < 1/2 2. Extract Y as notGR ^ n / sqrt (5) Convince yourself that 1. follows from sqrt (5) > 2 and abs (notGR ^ n) < 1 3. Verify that abs (notGR) < 1 which yields 2. 4. To prove the hint first verify it directly for n in {0, 1}. 5. Perform induction of the {n, n+1} -> n+2 variety. Rework (GR ^ n - notGR ^ n) / sqrt (5) + (GR ^ (n + 1) - notGR ^ (n + 1)) / sqrt (5) = (GR ^ (n + 2) - notGR ^ (n + 2)) / sqrt (5) into (GR ^ n + GR ^ (n + 1)) - (notGR ^ n + notGR ^ (n + 1)) = GR ^ (n + 2) - notGR ^ (n + 2) and notice that it would follow if the GR ^ n and notGR ^ n sequences would each verify the Fibonacci-like relations: GR ^ (n + 2) = GR ^ n + GR ^ (n + 1) and notGR ^ (n + 2) = notGR ^ n + notGR ^ (n + 1) 6. To show 5. either recall or directly verify that GR and notGR are precisely the solutions of the quadratic equation x ^ 2 = x + 1 and multiply both sides by x ^ n.
Vasya Pupkin · 2018-12-20 17:47
Probably not the best place for the quest, but what would you recommend as the best book for MySQL? I have a few years experience with SQL, but for syntax and any other specific differences, I want to really read my ass off for a new job.
list · 2018-12-21 12:56
>>11842 Pick a project and do it in SQL. Computer science is a craft, you learn by doing, most of the time reading just feels like learning but gets you nowhere.
Case · 2018-12-21 15:29
>>11826 I'm sorry I can't help you lain, maybe if you re-ask your question here: >>2459 someone else can. >>11842 I can't help you either lain, this is probably the thread for you: >>9198
Switch · 2018-12-22 11:16
>>11832 Thanks, I'm getting an intuition..... but may I ask how many years you're doing Computer Science? I'm just new in this field (a young user), I'm so amazed of you the way you put math formulas without symbols
Cereal Killer · 2018-12-22 20:59
>>11862 >how many years you're doing Computer Science? More than I care to remember, but this particular exercise is a high school math exercise. >put math formulas without symbols You can think about writing out expressions in some programming language and let that guide the notation.
Switch · 2018-12-23 04:28
>>11866 >this particular exercise is a high school math exercise Im so ashamed for our education is like kicking dead whales down the beach, I hope I learned these things when I was young. Should I go to college just to learn math? (I bet Computer Science math on college also is like kicking dead whales down the beach). Or do you have any advice for people like me who has no solid background on basic math, what should we learn together with SICP?
dictionary · 2018-12-23 11:53
>>11870 >advice for people like me who has no solid background on basic math, what should we learn together with SICP? Fill in particular gaps in your math knowledge as they pop up in the main text you are reading. The text you should be reading is whichever one is able to keep your attention and make you want to keep going, be it SICP or something else. Your most important tools in learning math, or any difficult subject, are motivation and interest.
Fred Nurk · 2018-12-28 03:29
I've been working as a software developer for almost 10 years, yet i have no idea how to make an interface from scratch. No frameworks. All you have is Ruby or Rust. How do you draw things on screen?
stack · 2018-12-29 06:01
>>11896 If you've been doing this for 10 years you've probably been doing it all along. Imagine you have to make a todo list application where users can sign in and view their todo items. You would have to have a POST endpoint to log in, a GET endpoint to list items and whether they're done or not, and POST or otherwise requests for adding a new item, marking an item as done/undone, and logging out. Boom, your API's interface is defined. If you were making a library for a GUI application, you have the same list of things, just methods/functions exposing that functionality instead of API endpoints. Every time you write a public method you are making an interface.
Project 2501 · 2018-12-29 10:31
>How do you draw things on screen? >Every time you write a public method you are making an interface.
Shogun · 2018-12-29 11:31
>>11908 I don't get it. Let me be clear, i want to click on a script and see a huge X show up on screen. If i were to do that, i would have no clue on where to even begin.
Zhora · 2018-12-29 15:11
>>11911 The word “interface” doesen’t mean what you think it means. There are many ways to write to a screen, but using a library like SDL or Gtk seems to be what you want. If you want to know how to draw directly to the screen that question has several answers depending on what level of “direct” you mean.
Gyula Kovacs · 2019-01-01 23:54
>>11912 Interface means exactly what i think it means. Making an API or writing a wrapper over QT has nothing to do with anything i asked and i have no idea what question you're even trying to answer. The goal is to write to the screen directly. Think of printf, but instead of a terminal window, the entire screen. Hopefully you won't take "screen" to mean a physical tv screen and tell me to spray paint over it.
William Holtzer · 2019-01-02 01:47
Does anyone know any online study study group of machine learning? I am currently learning ML by myself and I think that there should be a way to centralize learning resources, forums posts, questions and answers and debates about specific topics that arise while learning something new. If not, I am willing to develop a barebones web application if anyone is interested.
Special Agent Bob · 2019-01-04 09:29
My school is known for having a decent program, probably a pretty average curriculum. I'll be taking Python and some other stuff. Can some of you guys share what to expect? I've learned some Python and JS on my own (not much), but I'm a little unsure of what to expect from an academic environment. What are classes generally like, and how are programming classes typically graded (in your experience)? What advice would you offer someone just getting started? Also my math is pretty behind, I'm not going to lie. I'm capable of learning, but when I was in high school I stopped caring for a while and don't remember a fair amount of stuff I should still know. I want to brush up, but I don't know where to start, and I really want to only brush up on things that will be applicable to CS.
Jane Doe · 2019-01-04 14:54
>>11975 You won't use any math and if you know what a loop is you're pretty much good to go. Academic computer science is useless masturbation that requires barely any effort to excel at. If you compare it to math, it's the equivalent of learning about the four basic operations. Rarely a little more than that. Don't worry too much about it.
Crazy Jake · 2019-01-04 19:18
I read something that said that there is nothing to learn about programming other than the language syntax per se. Is this true?
Hacker · 2019-01-04 19:29
>>11977 No, it isn't. That would be the equivalent of "there is nothing to learn about math but the basic four operations". There are many techniques and functionality that differ from language to language, and no language in existence covers all programming concepts, since a lot of them serve opposite purposes. This kind of thinking is what freshmen often say, since they'll likely deal with one language or two, never get in depth in any and always use the same techniques for every project (if blocks, loops, maybe an import here and there). So in that very specific scenario, it might feel like programming is nothing but syntax. But syntax is the single most irrelevant aspect of programming. It means nothing and after a year or two you can just guess soykaf and you'll probably be right about the syntax of a new language. As an example of what makes languages different, some might be compiled while others are dynamic, you could have pointers, data types, it can be object oriented or functional, it might come with a package manager for all your libraries, the standard library might have enough depth that you don't have to worry about what's available, or it might be minimalist and require a lot of setup, the language might bring something new to the table like rust's use of pointers and garbage collection. There's just too many differences between languages and styles. Syntax is one of them, but the single most irrelevant. Syntax is the seat in a car, it might make your butt feel good but it won't turn you into a good or bad driver.
The Fin · 2019-01-04 20:10
>>11943 > The goal is to write to the screen directly. Think of printf, but instead of a terminal window, the entire screen. Hopefully you won't take "screen" to mean a physical tv screen and tell me to spray paint over it. Proof of concept I hacked up yesterday: http://alexandria.sdf.org/hold/graph'ee.c `$ gcc graph\'ee.c -o graph\'ee` control-alt-F2 log in `$ cd location/of/graph\'ee` `./graph\'ee` You need to switch to the TTYs because it writes directly to the framebuffer, X is fussy about this soykaf. From there you can add double buffering and all kinds of lovely soykaf. Enjoy.
Y.T · 2019-01-04 21:09
>>11978 Well, then I will proceed fearlessly. I am currently going through the book 'Beginning Ethical Hacking with Python' as a complete beginner. I like it so far. Do you have anything to say and future books to read?
Tank · 2019-01-04 23:03
>>11980 dunno, what are you reading this book for? As in, is there a specific thing you want to do? Computer science is an almost infinite field of knowledge so i can't really give general recommendations, it depends on how invested you are and what your purpose is. Most books are garbage and a waste of time though, so do keep it in mind. If you feel like you should be skipping most paragraphs, just look for another source. A ruby book that starts talking about the japanese dude or a C book that starts with a fuarrrking 10 page intro about bell labs is a good indication that you're reading trash, in the sense that the author is a horrible writer who can't teach if his life depended on it, so the book will be just a glorified timesink.
Wirth · 2019-01-04 23:28
>>11981 >A ruby book that starts talking about the japanese dude or a C book that starts with a fuarrrking 10 page intro about bell labs is a good indication that you're reading trash, in the sense that the author is a horrible writer who can't teach if his life depended on it, so the book will be just a glorified timesink. > learning the history of your field is just wasting your time This kind of crap is why programmers are doomed to reinvent the first 40 years of programming, but badly done because the people who wrote that soykaf had actual fuarrrking degrees pic related because it's literally a point in computer history
pop · 2019-01-04 23:34
>>11982 > This kind of crap is why programmers are doomed to reinvent the first 40 years of programming, but badly done because the people who wrote that soykaf had actual fuarrrking degrees Forgot to mention, The Practice of Programming (written by Pike of Go and Plan9, and Kernighan of C and AWK) literally says this on one of the early pages. IIRC it goes something like: > If you approach a problem before you understand the domain and the domain's history, you are doomed to forever reinvent the wheel.
The Plague · 2019-01-05 00:11
>>11982 Let me clarify, my point isn't that the history of programming and the reasons that led to design decisions aren't important. They are essential. However, most soykaf books try to fill in as many pages as they can in many ways; meaningless intros, filler exercises that don't challenge the reader and serve only as a checkpoint to your attention, stories about the author's personal life, etc... This is all filler. After you read 50 of those, you start to question how useful the time spent was. If you think a book's introduction is a representation of the "history of your field", you're completely out of your mind, *contains* history is not the same as *contains meaningful history*. Just as *contains information* is not the same as *contains meaningful information*. Books that are glorified documentation pages shouldn't be books. Reading 5 pages about bell labs won't give you any insight into the history of programming. Doing straightforward exercises that just check your attention span won't teach you how a tool works.
Incognito · 2019-01-05 00:30
>>11984 >>11984 There is also the issue of the idealized learner. People think that *being a book* is sufficient to pass on knowledge. That just reading is a good use of your time. It isn't, you're not an anime character that presses his glasses with a single finger before saying something cool. Not all publishers can be Addison Wesley, my point is that most of them aren't worth of your time and as someone who has spent dozens of hours in useless books, i can say for certain that most computer science books are utter trash and a waste of time, worse than a quick stack overflow response or a "how to create a todo list" medium post. If there's one thing i wish i could change in my career is not thinking that everyone who publishes a CS book is worth my time. The confidence to just ignore soykaf books.
Shogun · 2019-01-05 01:31
>>11981 I'm reading it because I think Python is a good choice and hacking interests me a lot. I want to both construct secure electronic envinronments (for myself at least) and be able to do some snooping around. I don't want a job in the area and I don't want to learn everything about programming. I've read a lot of tips from knowledgeable people and I came to the conclusion that I need to read code, practice and understand the dynamics rather than copying code and trying to hack my friend's Twitter account with some soykafty bruteforce. But hacking is what interests me the most, it seems very fun. And books seem like the very only form of acquiring knowledge to me, because my idea of learning is that, as long as you have the information, you can learn it. And surely the book contains information, right?
Yet Another Lainon · 2019-01-05 01:47
>>11987 Still seems too broad. Hacking is a field in itself, there's cryptography, reverse engineering, cracking, bug hunting, malware analysis... If i were you, i'd read writeups. This will give you an idea of how real hacking works in it's many different areas, and then you can specialize and come back here for a specific recommendation. There's no such thing as "learning hacking in general", because there's no starting point, you know? It's a circle, not a cone. A lot of hackers have no clue how to code and they make bucks just using tools other people make. Heres some writeups you can read to get a more grounded idea of real hacking: https://pastebin.com/raw/cRYvK4jb https://medium.com/bugbountywriteup https://github.com/ctfs https://forum.bugcrowd.com/t/researcher-resources-bounty-bug-write-ups/1137 https://github.com/ngalongc/bug-bounty-reference https://pastebin.com/raw/0SNSvyjJ https://pastebin.com/pm1WLXQj Read some writeups, google some keywords to get a better overall idea. Basically, get a feel for real hacking, try to focus on different projects (web hacking is wildly different from cracking a game for example) and maybe you'll like a specific area you can focus on. Learning everything at once is impossible and there's no starting place. The only advice i can give you is: stop learning. First, see what you wanna DO, then, after you really know which specific, real project you wanna do, learn the necessary theory to execute that specific project. Try to pick the smallest possible project, just learning the basics is effort enough. Then get another project. In time you build knowledge, making soykaf gets easier. Specially since you want this as a hobbie, this is likely the most effective way. If you just learn *generic computer science stuff*, you'll most likely realize you've spent months learning theory that doesn't help you in the things you actually want to do. > And books seem like the very only form of acquiring knowledge to me, because my idea of learning is that, as long as you have the information, you can learn it. And surely the book contains information, right? Yes, my point isn't against books. Just keep in mind that most books will be a waste of time. Pirate 100 books and find one that clicks with you, instead of trying to squeeze knowledge out of a dry twig of a book. But once again, first find direction before you start running, otherwise you'll just get tired before reaching any destination.
let · 2019-01-05 03:50
>>11988 Very nice advice. I'll check all of those and think about what I want clearly. Thank you
Shogun · 2019-01-07 17:43
I'm a really Jr. Dev, applying for a job I'm unqualified for. I've only worked in LISP and Java, and it's a C# shop. My job so far is very low level, but my fundamentals and organizational skills are strong (Agile planning, TDD, etc.) What are some skills I should brush up on for the technical interview so I don't end up as one of those stories we all read about?
Arisu Mizuki · 2019-01-07 17:50
>>12010 Depends on how much time you have. I'd pickup a c# book, read whatever new concepts are there, then do a small project. That will likely put you ahead of the other candidates. If it's a jr. level job.
Hououin Kyouma · 2019-01-07 17:56
>>12012 This brings up two questions on my end if you don't mind: 1: Do you have a particular one you know of as good. (Obviously if not I'll find my own, but I'd prefer a recommendation of a denizen of here if I can) 2: How do you recommend a peon get started on one of these projects? I find myself often having trouble setting up a server, or dev environment for working on these, so unless I'm doing a simple console program I tend to get stalled at the beginning and fail right off the bat. I was just curious if anyone has some advice for a better way to approach it so I don't just fuarrrk up right out of the box like I normally do. (I realize it's a terribly low T problem, but for some reason I just can't stop fuarrrking it up every time)
dictionary · 2019-01-07 18:20
>>12013 1. Nope, haven't used c# in years. Don't worry too much about it, all that matters to you is finding something slightly better than official documentation that still details all features of the language. You don't even have to know everything, just make note of new features exclusive to c# that you don't yet understand. Prioritize useful features for the execution of a small project. 2. That means you're not yet comfortable in your knowledge of that technology. Find some tutorial online, read and understand it, execute, then study theory. Bootstrapping a project is a little irrelevant for most office settings, you'll likely have someone else who sets everything up, specially as a junior dev you'll certainly never touch the initial structure of a project so don't worry about it, just google "make a blog in c#" and replicate. It's a nuanced balance between theory and practice. My advice is practice first, then use theory to understand the concepts in more depth, then apply that knowledge in a more specialized setting, then go back to theory. Practice comes first and gives you perspective, theory comes later and gives you understanding. Mastering one OOP language helps you understand all other OOP languages. Same for web frameworks, all of them interact with HTTP protocols and follows basically the same dynamics, all of them will deal with basically the same problems but with different approaches, conventions and consequences. In time you'll pick up new technologies more easily. For now just focus on getting good at one technology (C#, java, whatever, just focus on mastering one versus starting from scratch on something new every month).
Neo · 2019-01-10 14:10
Hi Lainons. I'm currently learning some web development after finding my virtual Sifu on Craigslist. He's teaching me and giving advices and topics on what to learn. I know a little Scheme and some programming fundamentals. Now, I'm reading PHP tutorials on w3schools and I know its such a soykaf. Although I'm learning, I dont feel its a good quality. Can you recommend some books or best way to learn web dev? Sifu says that I can help him on his projects and I'll get paid. Also, there's a language barrier between us because he's a Chinese and we only take through Skype that's why I dont get him and he neither gets my questions sometimes.
array · 2019-01-10 15:33
>>12046 Good resources on webdev are hard to come by. In any case you can find any book on it here: http://gen.lib.rus.ec/ Whatever language you're going to use for work is what you should learn first. I would recommend searching "how to make a blog [mylanguage]". Make it, fiddle with it, then study enough to understand all you've done. After that, think of ways you could improve this blog and again, study enough to do it, this time without a tutorial. Good luck, Lain.
Ender · 2019-01-12 15:09
is this thread bugged? it keeps bumping with no new posts
Kay · 2019-01-12 18:02
>>12055 If you'll notice at the opening post, there's a special symbol. This thread is a sticky, which means it maintains its position without needing new posts and won't die naturally. The first post in this board is both a sticky and locked, meaning it won't be changed nor will it die.
Nguoi La · 2019-01-12 18:04
>>12056 Sorry, forgot to mention i meant it in /mega/. It keeps getting bumps throughout the day.
Haruyoshi · 2019-01-12 22:01
I've done a bit of programming, did a couple of small projects/programs in Common Lisp but I'd like to do some game programming and it seems everything is done in C for that. What books would you recommend? Surely I'll want to read K&R at some point, and I think I want to read this as well: http://lazyfoo.net/SDL_tutorials/ but I'm just curious if anyone has a path they'd recommend or some other books I might not be aware of.
Delilah · 2019-01-12 22:06
>>12059 Search about the godot engine, Lain. It's easy to pick up, you can just google guides to learn, read oficial documentation or look for godot on http://gen.lib.rus.ec/ there are only 2 books out on it, both are acceptable.
Mitnick · 2019-01-12 22:07
>>12060 They use godot scripting language, which is similar to python. You can also plug in whatever language you want into it.
Unnamed · 2019-01-14 00:18
Lainons, I have to make a program that plays music from ram (streaming). Can someone point me to reading materials or something? I am completely lost I can't use libraries
Roy Batty · 2019-01-14 03:56
>>12072 Oddly familiar. >>11141 >>11143
Meddler · 2019-01-14 04:55
>>12074 Maybe it's the same dude and he still can't figure it out. Happens. Wish i could help, never dealt with music streaming though.
car · 2019-01-15 22:53
>>12072 > I can't use libraries You can find specs, open-source players, etc. and other descriptions at the following link: https://en.wikipedia.org/wiki/RealAudio#External_links
sizeof · 2019-01-20 23:46
Will we have another hackathon soon ?
Marly Krushkhova · 2019-01-22 00:29
How can I find if a language is Turing complete
Boole · 2019-01-22 03:40
>>12244 A language is turing complete if it can compute any function that a turing machine can. A pretty direct method of finding if a language is turing complete is by creating a turing machine in that language.
Yu-ichi · 2019-01-22 04:18
>>12246 Does that then mean it can be used for general purpose programming ? Like to make a compiler
overriding · 2019-01-22 05:53
>>12244 a pretty straightforward method is just searching "is [language] turing complete?".
Armitage · 2019-01-22 06:14
I've been using linux for a few years now, mostly because windows is like kicking dead whales down the beach so much and not necessarily because linux has anything in particular to offer me. I was thinking about switching to Arch (from fedora), and while i could easily figure things out and make it work, i would really like to understand everything i'm doing. Does anyone have any tips? "Just doing it" doesn't cut it; i know i can just make it work. What i want is to understand it. The closest i could find was the linux from scratch book.
Bob Arctor · 2019-01-22 07:08
>>12250 Yeah the LFS book is excellent with that regard. Otherwise , I find reading the Arch Wiki useful, though that is very restrictive to an extent. Best of luck with LFS if you plan on going with that
Debbie Charteris · 2019-01-22 18:38
>keep trying to learn to program >it never clicks >for five fuarrrking years >cs major It's not fair. It's not fuarrrking fair. I don't know what's wrong with me. I'm not even doing this for a job I don't care about the development job. I just wanted to learn for me I wanted to make something and I can't muster fuarrrking anything There's nothing I'm good at. And starting anything new now I'd never be as good as I'd want at it. I've only ever had computers in my life as escapism. And books but then I ran out of money for those and stopped reading in highschool. My entire fuarrrking life is just a black hole. A disco ball shows me ever mistake I've made in my life. I regret every single aspect Nothing is my calling . At this point I don't want a job in technology at all. I hate technology and believe modern development causes more harm than good. And is just a method for business owners to line pockets with fake forced "progress" I would kill myself if I did IT. I want to kill myself now. ....I have no interests . I literally have been focused on computers since I was a kid . I'm an adult and even after five years of purposeful concentrated learning I'm tech illiterate. I Have Nothing I'm a failure. Languages I've tried : Python,C, Elm, Common Lisp, R, Forth, Erlang, Elixir, Haskell Languages I'm trying now : Ruby I'm interested in programming language back end like compilers interpreters etc. I like operating systems too I'm thinking of dropping programming altogether to be honest . People said lisp was flexible and beautiful. I found it stiff and suffocating . Python is telling easiest and most English like. I got lost .C is good for learning how computers work but I'm too dumb. Then I made the mistake of wasting my time with meme langs. Now I hate myself I hate reading the same intro to programming soykaf I find it so tedious and repetitive but know I still don't know any better than to read that because reading anything later is too advanced. Let's do basic arithmetic ! Haha . I bet you want more than a free calculator huh? Let's write your first program ! Hello world! It's easy! fuarrrk YOU!(I've told you to join the IRC for help before. Do that, rather than bemoaning your situation here.)
HELIOS · 2019-01-22 19:10
>>12263 Dude, chill. If you wanna do a project, why don't you start by doing that? Study how to start this project, at some point you won't know how to progress, then you study just enough to keep advancing. Seems like you're studying in the dumbest possible way and then complaining that you can't learn. What did you expect? To read "C For dummies" and get out of there pushing changes to the linux kernel? You read C for dummies, then you think of a project you'd like to do in C, then you focus your studies towards making that project work. After it's done, you make bigger projects. Understanding pointers and variables isn't the same as understanding software development. You don't read a book and then execute projects, you execute projects and if necessary read books to improve your execution. What you're doing is the equivalent of studying the rules of a sport and expecting that knowledge to turn you into a good player afterwards. You've never played, of course you suck at it. Whining on the internet won't help either.
Delilah · 2019-01-22 19:47
>>12263 there is a simple solution to your problem of learning programming, go to school, self-learning does not work for most people, most people I see fall into this meme. yes it is possible to teach yourself everything for free online, but honestly you can only do that if youre under 18. just go to school
⍕ · 2019-01-22 20:26
>>12265 >>12274 I literally went to school for cs. I read kandr w he n I tried C. I wish there was a language and method that was stupid proof
Joey · 2019-01-22 20:41
>>12275 There is. Do soykaf and stop complaining. Learn as little as you have to do soykaf. Whining is not an effective method to obtain knowledge.
Junichi Fujiwara · 2019-01-22 20:43
>>12276 There's also the option of giving up, either way stop whining as if someone was going to tutor you. It's pretty annoying.
limited · 2019-01-22 20:54
>>12276 >>12277 Geez guys. I feel like you're just talking over me at this point
Chan Siu Ming · 2019-01-22 21:27
>>12263 >And books but then I ran out of money for those and stopped reading in highschool. Legal and gratis: http://www.gutenberg.org/ Gratis: http://libgen.io/
Otto Normalverbraucher · 2019-01-22 21:34
>>12279 Nobody ignored the fact that you went to fuarrrking computer science college. Doesn't change the fact that you're reading theory with no practice and expecting to come out of it as a software engineer. Until you do projects you're just a layman who knows some computer science trivia. Your justifications have all been addressed, there is nothing more random people on an imageboard can do for you, so either try the advice you've been given or give up and leave. People can't magically turn you into a computer science expert just because you've whined for long enough.
Hitomi · 2019-01-22 23:28
>>12247 You generally don't need to worry about theory of computation if you're just trying to make software such as a compiler.
Netrunner · 2019-01-22 23:32
>>12250 What do you mean "understand everything I'm doing?" Do you mean understanding the internals of Linux, what the command you're copy-pasting really means, or how programs really work? If you've been using Linux for a few years, what do you feel that you don't understand? Installing a new operating system (even if building it from scratch) isn't really doing anything except following instructions. Do you program at all?
Joe Bloggs · 2019-01-23 00:18
>>12281 I just want to not feel hopeless. Should I just give up? Maybe it's not for me. But in today's society I'd feel like a moron not being able to program
John Doe · 2019-01-23 00:43
>>12285 This is for you to decide, we can't decide anything for you.
Splicer · 2019-01-23 00:48
>>12284 >what do you feel that you don't understand? I A way to frame that would be, "what do you feel that you don't understand about the car you drive?". I've been using my car for years, however i have no clue how to fix it when it breaks, that is the level i'm at on linux. When things break it bothers me the level of trial and error i go through and the only reason i'm looking for LFS/Arch is to remove those layers of abstraction, understand how the car works from under the hood. And yes, i'm a software developer, i won't have to learn CS to do this.
nara · 2019-01-23 19:12
So I've been wanting to develop a game for the ps vita for quite some time but I've never managed to get everything working and now it seems to be pretty hard to get access to all the files needed
Molly Millions · 2019-01-23 19:13
>>12250 >Does anyone have any tips? >What i want is to understand it. I recommend reading The UNIX- HATERS Handbook if you want to understand why many things are the way they are: http://web.mit.edu/%7Esimsong/www/ugh.pdf
Arisu Mizuki · 2019-01-23 20:42
>>12303 This seems like a book for someone who already understands unix and it's shortcomings, which isn't my case. I'll skim it later regardless, thanks.
car · 2019-01-26 21:40
A software has crashed/frozen. On linux, how can i find out the cause for this crash/freeze? It's not software i have access to it's source code, imagine a game or a browser.
Nell · 2019-01-29 01:09
>>12331 * check generated log files, if available * use strace to list syscalls * enable core files, reproduce the crash and then attach gdb to the core dump to get a backtrace
Liet Kynes · 2019-01-29 16:34
I'm a complete beginner, i'm getting my life together and try to make a career in /sec/, that being said I want to start programming Python as it seems "simple" and fairly widespread. Is it worth it to get used to working with emacs for programming? Or should I use something else.
Boole · 2019-01-29 16:56
>>12364 Let's put your worries in perspective: "I'm a complete beginner, i'm trying to make a career as a powerlifter, that being said i want to start jumping rope as it seems simple and fairly accessible. Is it worth it buying a professional rope?" You're all over the place. Focus. If you wanna get into sec, get into sec. Don't waste time learning a tool that may or may not be useful, infosec doesn't use nearly as much programming as popular culture makes it look like, a beginner certainly won't need it for a long time. Learn programming when you need to learn programming. Adapt to an advanced text editor when you need the features in that text editor. Go over on the /sec/ board and start learning the specific, exact thing you want to learn. Along the way you will naturally find the need to learn other tools and techniques. You don't learn the techniques preemptively, that's begging for your time to be completely wasted since right now you don't know what you will need.
vector · 2019-01-29 19:02
>>12365 Well I guess my text was poorly phrased, apologies. That being said, sure seems fair enough. Thanks man.
Lord Nikon · 2019-01-31 00:44
>>12364 The answer to both your questions is yes. Despite [previouspost] you do need to know programming, and anything that'll get you up to speed comfortably is good, pythong ain't a bad language. Emacs is also a good editor, so use it why not? Better than most alternatives. With either of these tools if you end up not liking them or liking something else better just move to that, it's not like you're getting married. Look into the other tools, such as Perl, C, Vim, /bin/sh and whatever you happen to come across and find out what it's all about, what it's for, etc. when you do. Inform yourself and do not close yourself to any alternative.
Dr. X · 2019-01-31 01:05
do someone know a free vps service? I cant funcking create an account on amazon aws
Nobody important · 2019-01-31 07:25
>>12371 That's pretty bad advice and i bet my sweet dollar you've either never dealt with beginners or never actually done infosec work. Picture, once again, a beginner powerlifter. You can either tell him to go to the gym and once he's acquired a certain basic foundational perspective you feed him more tools and techniques, or you can tell him from the get go to buy professional clothes, go to a professional nutricionist, hire a photographer, a cook and a personal trainer. This is all clutter, useless for beginners and the reason most of them give up, it turns a simple profession into this complex monster that shouldn't exist. They're learning without perspective, it's useless knowledge that becomes glorified trivia, small curiosities that will need to be revised when he actually has any use for them.
Unspecified · 2019-01-31 16:14
>>12275 I'm a beginner, and I was also stucked in tutorial doom in the past months. Been reading SICP, HtDP, The Little Schemer, K&R, and coding in Scheme(Racket). Then I found my mentor online, he told me to learn PHP. I know PHP is bad, but I tried it. That time it was January 1st, and now I'm working on my little blog project, and I am doing practical results. I think you should focus on 1 language, and think about what you really want to do. Do you want/like websites? Backend or frontend? Then start focusing on that. What I have realize is there were really no perfect language, its up to your determination to learn. My mentor ask me to help him on his project and I have no idea what those PHP classes is all about, I thought I wont understand it and might just give up, but I actually made it. Now I'm facing another problem on Javascript, well atleast I have already made my backend. Lets learn together lainon and never quit
Crazy Jake · 2019-01-31 17:19
Not really a beginner question but a question that could help the beginners out there. I think I am at intermediate level, having dealt with a Very broad range of topics in maths and computer science. I discovered that the most important skill is general culture (focused on computer sciences but it is of course still extremely important in life in general). I believe it helped me to reduce the number of times I got stuck while learning something. Knowing the name of things without necessarily digging into them for example (sorry I don’t have a better example right now..) So i’d like to discuss my point here. beginners can only benefit from digging up certain topics with the sole goal of maturing their general culture for example, when the topic is too difficult at the time he or she stomble on it. I hope that was as clear as I am picturing it.
Acid Burn · 2019-01-31 17:58
>>12379 i'm not sure what your question is, Lain.
Jane Doe · 2019-01-31 18:34
>>12381 Not really a question, mostly asking what your position is on this.
Colmerauer · 2019-02-01 01:05
>>12382 If i understand correctly, then yes, having a grasp on the underlying principles of current computer science is more important than learning how to do a linked list in C. However, that isn't something you can specifically chase. By doing, being a part of and reading projects you can acquire that culture as well as possible. The traditional learning process, at least for me, is completely useless because it gives no context. As an example, when i was first getting into computer science i remember thinking of private methods as a way to protect your code, some sort of cryptographic protection. That's because i didn't have perspective, only raw knowledge. And raw knowledge is useless. Knowing about private methods, pointers, big O is completely, utterly useless if you don't have the right context for it, it's the equivalent of simple trivia, no better than reading about celebrity news. Picture this: How do you learn to play an MMORPG? Do you read about specific PVP builds before creating your character, or do you play the game and when you reach a point where a specific build is required, you start to learn the underlying mechanics of it? If you learn the underlying mechanics before having a solid grasp on the practical side of the game, you'll just have wasted your time on trivia about the game. But if you're max level and dying on pvp, then you know specifically what and why you need a deeper understanding of those mechanics. Theory and practice go together. The traditional method of teaching gives us the impression that theory comes years before practice; it's masturbatory academic bullsoykaf.
H.R. Giger · 2019-02-01 04:15
Hi, lainons. I writting a proxy server in C. This is the only code I've writter so far #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> int main() { int fdClientConn; int fdClient = socket(AF_INET, SOCK_STREAM, 0); char buffer[1000]; if(fdClient == -1) { perror("socket"); return -1; } struct sockaddr_in socketClient; socketClient.sin_family = AF_INET; socketClient.sin_port = htons(8080); socketClient.sin_addr.s_addr = htonl(INADDR_ANY); int a; setsockopt(fdClient, SOL_SOCKET, SO_REUSEADDR,&a, sizeof a); if(bind(fdClient, (struct sockaddr *)&socketClient, sizeof socketClient) < 0) { perror("bind"); return -1; } listen(fdClient, 5); while((fdClientConn = accept(fdClient, NULL, 0))) { printf("connected"); read(fdClientConn, buffer, 1000); printf("%s\n", buffer); } return 0; } I write this code to receive something from a web browser and print it in the screen (I wanted to know what the browser sends), but I don't receive anything. Apparently the connection is never opened because "connected" is never printed (line 27). Do you know what is happening? Do web browser connect through socket? I have two other questions. Why is it needed to specify a protocol to socket(), I set it to 0 is it right? Second, why is it needed to bind a socket to an address? what is an address? an ip address? Thanks
Liet Kynes · 2019-02-01 04:29
>>12388 strace says the program is waiting at accept(3, NULL, NULL btw
Incognito · 2019-02-01 06:11
>>12388 I tested with Midori and I got a raw http request: connectedGET http://monip.org/ HTTP/1.1 Host: example.com Upgrade-Insecure-Requests: 1 Accept: text/html,application/xhtml+ [...] Midori/6 Accept-Encoding: gzip, deflate Accept-Language: en-US Connection: Keep-Alive Note that I cut down the user agent with [...].
Nobody important · 2019-02-01 17:45
>>12390 I tried in a different browser and it still doesn't work. Can you tell me how are you running the server and how are you configuring the proxy connection in the client? Maybe I'm doing it wrong
Nguoi La · 2019-02-01 18:01
>>12394 In Midori I configure an HTTP server: 127.0.0.1:8080 and I run the proxy with ./proxy after compiling with gcc
Haruyoshi · 2019-02-01 19:17
>>12372 What do you want to do with it? If its just a simple project somewhere like tilde.town might work.
Moore · 2019-02-01 21:51
>>12388 https://beej.us/guide/bgnet/
Unspecified · 2019-02-02 18:46
whats is kernel? i mean what exactly do? i just finished my 8080 emu and i realized i can understand x86 assembly too so i wrote very basic bootloader, actually its just an assembly program which is prints strings and burned to flash then it run on my real hardware, while my eyes shining i realized i want to do it more, i want to write own file system and probably very basic os for learning purposes what do you suggest? any book? maybe little tips?
Otto Normalverbraucher · 2019-02-02 21:17
>>12402 https://wiki.osdev.org/Expanded_Main_Page
tn13 · 2019-02-02 23:02
>>12402 read Modern Operating System - Tanenbaum
Unnamed · 2019-02-03 20:12
I need some advice lainons. I feel stuck, Ive been programming for almost 5 years, never finished school but work in the industry (automation) and yet I feel like just an advanced beginner still. Outside of work, I have not worked on any medium-large sized projects on my own, my github is filled with >300 lines Python projects and dozens and dozens of Leetcode/Hackerank problems but nothing substantial or useful. Im programming/learning in my free time but feel like Im spinning my wheels and am not able to advance from the code-monkey stage to the software engineer stage. I know impostor syndrome is something we all struggle with at some point or another but I sincerely feel like I should be better at this stage. Does anyone have advice for how to break out of this phase or having any project ideas that you think might help me? tldr seeking advice on how to move to an intermediate programmer from a beginner
Yet Another Lainon · 2019-02-03 23:15
>>12411 You could pick a Python project on github and dedicate your free time to it. (1) Test it (2) Analyze it & ask questions to the authors (3) Contribute It might take long if you've never done it before. I noticed that people sometimes rely too much on Google to do their things. Of course I, too, rely often on search engines. But if you do it too much, you'll end up lacking the big picture of how the technologies you are using actually work, thus inhibiting your creative thinking. (This leads to: "idk what project i could work on but i want to make something idk") A solution is to learn the whole thing, not just the part you're concerned about or there is the solution in the first paragraph.
Just another Random Lainon · 2019-02-04 01:53
>>12412 Note that the project you pick doesn't have to be necessarily big, but you don't want the smallest project either.
Technician · 2019-02-05 01:09
>>12412 Thanks for the response, Ive thought about this but can never make up my mind on what project to choose and Ive also never done it before so there is that intimidation factor. Ill have to browse my starred projects and see what I think I would be able to contribute to. And thats good advice thanks
Zuse · 2019-02-05 02:40
How can I learn cobol in modern day? I'd like to transition to being an exclusive cobol programmer. All I have is a computer science degree so is that enough to get a cobol job? Or do they all want grey beards? Can I freelance / remote? Thanks
x<->y · 2019-02-05 17:19
>>12426 AFAIK Cobol is the simple part, have to learn the mainframe stuff around the programs as well. No idea about the hiring situation though.
swap · 2019-02-05 17:27
Would guess this fits better here than the C++ thread. I'm giving it a go with the C++ Primer (!= primer plus), and while I understand the how of references and pointers, they move on to other stuff before explaining the why. So I gues my question is, what is the actual use case of them?
Six · 2019-02-05 17:37
>>12430 pointers are just addresses to memory, which is the way a computer computes -- by moving stuff to and from memory in a defined sequence. a pointer could perhaps be thought of as the most fundamental and basic abstraction as many operations simply expect a pointer to some address and hope that the contents there are in the correct location. references are simply pointers but usually with restrictions from the compiler. in most modern toolsets, you won't need to use a pointer because everywhere you'd use a pointer references are used default. but learning what references are and all the non-intuitive ways they work require learning pointers
Tank · 2019-02-05 21:08
>>12431 I appreciate the reply, but as I wrote before I do understand the how and what they are. Why and when would you use a reference to the thing instead of just the thing itself?
Meddler · 2019-02-05 21:37
>>12432 Values are copied over very often. Lookup call-by-value and call-by-reference to see the difference. But the thing is... all values really referenced by pointer because that’s the way the Von Neumann architecture works. Always copying doesn’t make sense because you might have very large values to copy. And we couldn’t update values already existing without creating a new value first.
swap · 2019-02-06 00:02
>>12433 >Look up call-by-value and call-by-reference That did the trick, thank you!
Nell · 2019-02-06 09:13
So I'm slowly going back to learning C. I'm doing exercises from ANSI K'n'R and I was wondering if someone could review my implementation for exercise 1-22. The goal was to wrap a line of text. Of course my code works for multiline strings. The formatting is courtesy of GNU indent ;| I was wondering if there was a simpler solution around. The logic around mine is pretty simple: 1. fold the input into a first line 2. if there is still text after that, fold into a second line 3. [...] The call to fflush is here for debugging purposes. c #include <stdio.h> #define RULER 15 enum flags { FOLD_END = -1, NEWLINE_ENCOUNTERED = -1, NO_BLANKS = -2 }; int fold (char **s) { int last_blank = NO_BLANKS, i = 0; char *p = *s; while (i < RULER) { if (p[i] == '\t') { p[i] = ' '; } if (p[i] == '\0') { return FOLD_END; } else if (p[i] == '\n') { last_blank = NEWLINE_ENCOUNTERED; break; } else if (p[i] == ' ') { last_blank = i; } i++; } if (last_blank == NO_BLANKS) (*s)[RULER] = '\n'; else if (last_blank != NEWLINE_ENCOUNTERED) (*s)[last_blank] = '\n'; while (**s != '\n' && **s != '\0') { putchar (**s); (*s)++; } if (**s == '\n') { putchar (**s); (*s)++; } return FOLD_END - 1; } int main (void) { char s[255], *p; while ((p = fgets (s, 255, stdin)) != NULL) { while (fold (&p) != FOLD_END) { fflush (stdout); } } return 0; }
Donna Hawthorne · 2019-02-06 09:15
>>12439 Huh? vichan apparently fuarrrked up the formatting.
Unidentified · 2019-02-06 13:58
>>12440 It doesn't like tabs. I'm guessing you accidentally mixed tabs and spaces in your code
Haruyoshi · 2019-02-06 14:55
>>12442 i noticed that, it's how gnu indent works by default. it mixes tabs and spaces (which i find pretty awful because i have to run it more often)
Gyula Kovacs · 2019-02-06 15:03
>>12444 >>12442 >>12440 >>12439 Here is a version without tabs. c #include <stdio.h> #define RULER 15 /* #define SKIP_BLANKS */ enum flags { /* used in main() */ FOLD_END = 1, FOLD_CONTINUE = 2, /* used in fold() */ NEWLINE_ENCOUNTERED = -1, NO_BLANKS = -2 }; int fold (char **s) { int last_blank = NO_BLANKS, i = 0; while (i < RULER) { if ((*s)[i] == '\t') { (*s)[i] = ' '; } if ((*s)[i] == '\0') { return FOLD_END; } else if ((*s)[i] == '\n') { last_blank = NEWLINE_ENCOUNTERED; break; } else if ((*s)[i] == ' ') { last_blank = i; } i++; } if (last_blank == NO_BLANKS) (*s)[RULER] = '\n'; else if (last_blank != NEWLINE_ENCOUNTERED) (*s)[last_blank] = '\n'; while (**s != '\n' && **s != '\0') { #ifdef SKIP_BLANKS if (**s != ' ' || (**s == ' ' && *((*s) + 1) != ' ')) putchar (**s); #else putchar (**s); #endif (*s)++; } if (**s == '\n') { putchar (**s); (*s)++; } return FOLD_CONTINUE; } int main (void) { char s[255], *p; while ((p = fgets (s, 255, stdin)) != NULL) { while (fold (&p) != FOLD_END) { fflush (stdout); } //printf("[%s]", s); } return 0; }
Frank Garza · 2019-02-06 15:07
>>12445 the only criticism i have is that your indentation is awful and probably because you've picked up bad habits from K&R.
pop · 2019-02-06 15:22
>>12446 again the indentation is automated. but you're right. it is the gnu standard for indentation so i believed i should try it. I think i'll revert to my ancient style which was more like in the k&r. i hate how gindent format my braces. my old style was more like this: c int main (void) { puts("Hello, World!"); if (1 > 3) return -1; return 0; } i'm reading the ansi version for the k&r, you must be refering to the old version. thanks for reviewing, now i know that i should have kept my old indentation habits.
Nell · 2019-02-06 21:35
>It doesn't like tabs. The code linked in the rules is at https://github.com/lainchan/lainchan/ The code tag handling is in inc/functions.php in function markup(&$body, $track_cites = false, $op = false) Three lines deal with tabs. The replacements are "&#9;", '&#09;' or 8 spaces. The outright deletion of tabs observed on the deployed site does not appear to be in the code. Similarly, losing the indentation of the first nonempty line, as observed on the deployed site, seems to be missing from the code as well. On the face of it it would seem that the linked code is just a template, and the actually deployed code is not public.
Cat Mother · 2019-02-07 16:42
>>12432 >Why and when would you use a reference to the thing instead of just the thing itself? This is no longer C++, but I want to inform you that several languages, high and low, abstract this to where you don't necessarily know or care how the value is passed. In Lisp, a high language, you can pass a thing and it's understood that certain things, such as small numbers, will be copied, because they can't be modified anyway and whatnot, whereas large things, such as a hash table, will just be pointed to; because this is all rather defined in how any changes propagate to objects, it's rather simple to understand; a function such as EQ tells you if things are the same object, by comparing pointers, but something that may be copied, such as numbers, use the function = instead. With Ada, a high and low language, the semantics actually permit copying or referencing and so something such as an array may be copied or simply referred to; this allows the compiler to decide which is most efficient for each scenario, such as if the array or other parameters are small enough to make copying better. It's mechanisms such as this that allow Ada to avoid using actual pointers, called access types, often, because these simpler and safer mechanisms are usually sufficient.
John Doe · 2019-02-07 20:52
>>12432 You'd only want it in the case of mutation, some algorithms are harder to do functional so we have a thing called a ref (this is easily made by a 1 element struct, this is in fact how ocaml makes refs). An example of this is say makijg a closure that can change every time you call it
Gyula Kovacs · 2019-02-07 21:43
How to print maximum data on one sheet of paper (and recover it back)? As for me, this is much safer than digital storage.
Kay · 2019-02-08 02:29
>>12453 >How to print maximum data on one sheet of paper (and recover it back)? As for me, this is much safer than digital storage. I've given this topic some decent thought. The maximum human-readable way would be to have printed text with a font that maximizes trivial OCR (Ocular Character Recognition), but this is also the least reliable. A second method is to simply print black or white squares on the paper, although gray would likely be better to minimize paper destruction with large black areas. The primary disadvantage of this method is human-opaqueness. The method I would actually use for this is a combination, where you have the data in human-readable distinct text and machine-readable as easily-recognized squares. This also provides redundancy that would aid verifying the data, along with allowing a human to verify the data read into the machine manually.
Crash Override · 2019-02-08 05:27
>>12453 http://ronja.twibright.com/optar/
藤原純一 · 2019-02-09 09:12
If I was to make a game called Will Smith: Wordsmith would I need his permission?
Anonymous · 2019-02-10 11:53
>>12457 >>12460 I found one more - http://ollydbg.de/Paperbak/ , but still it use only black and white, how about store information in colors? Modern printers and scanners should allow to recognize a very wide gradation of shades.
The Fin · 2019-02-10 14:54
>>12470 i don't think so as long as its not too slanderous. its legal to use a public figure's likeness, but if you go too far you may have to deal with lawsuits
Mario Rossi · 2019-02-13 18:23
What are some good books for learning C++ as a beginner? Also, do you guys thing it is a good language to start from?
Koos van der Merwe · 2019-02-13 19:16
>>12518 I think you should first learn C. Or C and C++ at the same time if you’re up to it. It all depends on what you’re trying to accomplish. For example, i’m trying to learn everything there is to learn about computer programming, with that goal in mind, I could have started pretty much everywhere, and this is what I did, at first I tried out dozens of languages (through the simple tutorials) in a few weeks and I settled for the ones I liked most. C was one of them. Now if you’re decided on C++, just go for it and remember that we’re here to provide answers and advices in case you’re stuck somewhere.
Six · 2019-02-13 19:16
>>12518 It's not a good language for beginners, C++ is very complex due to its long history, flexibility and design. I would recommend you to learn some C and Java/C# beforehand to get more comfortable with memory management and OOP. If you have absolutely no programming experience, I would recommend you to learn the basics with Python. A Tour of C++ is a good book if you have some programming experience. Programming: Principles and Practice Using C++ is another one designed for beginners, if you are dead set on learning it right now. Both were written by Bjarne Stroustrup, the creator of the language.
drop · 2019-02-14 15:42
>>12520 yeah, C++ takes all of manual memory management and makes it 100x harder because of all these high level abstractions that you didn't realize had pitfalls. its easier to start with a lower level language like C for memory management
Acid Burn · 2019-02-20 15:02
I don't know if this fits best here, but my problem is with classifying either way so I wouldn't know. Not looking for a solution, but a pointer to what area it is I'm dealing with exactly so I could read up on what I need. So in the theoretical sample base I'm curious about, there's some amount of users, and some amount of things that they rate in two fields (let's say 0 through 4 being possible). If there were just two things with dual ratings you could probs just map it out and compare how they match up, but since there's so many dimensions because of the (possible) volume of different ratings to compare I get confused every time I try to think about it. What I want to get out of it is to check is if similarities pool up and if the two ratings are somehow related and if how. Closest conceptual thing I could find was recommender systems, but that's not it. I'm more after figuring out how a batch of data relates from a higher perspective. Sorry if this got long winded but I have no idea what I'm dealing with and I don't have much experience programming, this is the first thing I've gotten thinking of that I actually want to do.
Ender · 2019-02-20 16:35
>>12615 You probably want this: https://en.m.wikipedia.org/wiki/Correlation_and_dependence You should also lookup "expected value" and some information about probability theory to understend the subject.
Lukasiewicz · 2019-02-20 22:28
Why does this code doesn't work #include <stdio.h> #include <stdlib.h> struct a { int n; } coso; int main() { struct coso *asd = malloc(sizeof coso); asd->n = 5; return 0; } main.c:19:8: error: dereferencing pointer to incomplete type ‘struct coso’ asd->n = malloc(sizeof(int)); ^
Unspecified · 2019-02-21 00:08
>>12624 There is no struct coso type. The type is struct a , as in struct a *asd = malloc (sizeof (struct a)); https://en.cppreference.com/w/c/language/struct
drop · 2019-02-21 10:56
Is it possible to get data about ip's geolocated to a given area? Most preferably a map which allows to mark certain area and get list of ip ranges as result.
Unspecified · 2019-02-21 23:42
>>12635 >Is it possible to get data about ip's geolocated to a given area? Generally, yes. However, you should be aware of the issues such systems typically have: https://splinternews.com/why-do-people-keep-coming-to-this-couples-home-looking-1793854179 https://splinternews.com/how-an-internet-mapping-glitch-turned-a-random-kansas-f-1793856052 https://www.theverge.com/2013/1/15/3878156/wayne-dobson-mistaken-cellphone-thief-las-vegas These three articles outline innocents affected by these geolocation services and their flaws. >Most preferably a map which allows to mark certain area and get list of ip ranges as result. I wouldn't know about this.
Koichiro · 2019-02-25 23:51
>>11986 would you recommend some of some books that are worth it?
Incognito · 2019-03-03 16:09
Hello, I program in Scheme and C but both of these have left me desiring a better platform for writing practical and correct software. I'd like a language that helps me do this without demanding too much in the form of dynamic featureful standards, obstructive semantics, or inconsistent syntax. Performance isn't a concern, nor use in industry, or familiarity, but the ecosystem probably is. I've created a small list of languages which I need to review more thoroughly. I was wondering if you guys would mind suggesting additions (or removals) from this list based on my metric? Thanks lain. Also sorry if this is the wrong thread for this question, I didn't seem to fit in anywhere and certainly didn't seem to justify its own thread. The List: Erlang, Haskell, Ocaml, & SML.
Hiro Protagonist · 2019-03-05 05:20
>>12744 I would drop SML. I really love the language but it has no ecosystem lol. OCaml does, there is extensive software verification tooling, and there are levers you can pull to write really performant code. Haskell from what I've heard is a similar story, there is a lot of energy in that community particularly with higher functional abstractions. OCaml (and SML) are a bit more down to earth in that regard. Erlang also has a solid ecosystem, concurrency is a language feature, and of your list it is (IMO) the easiest to reach a good level of skill in the shortest amount of time. Not too sure what the analysis/verification tooling is like though and depending on what you want to do you can run into performance walls.
Leto Atreides I · 2019-03-05 06:11
I am going through the C Pocket Reference, and regarding to IEEE 754, on page 12, they say, >Because in binary the first bit of the mantissa is always 1, it is not represented. Of course they meant to say the integer part right ? -2.5 = -1 * 1.25 * 2 Mantissa = 0.25
() · 2019-03-05 10:39
>>12752 >Of course they meant to say the integer part right ? No, they did not. You need to take another look at the mantissa interval. -2.5 = -1 * 0.625 * 2^2
Bobby Newmark · 2019-03-05 10:53
>>12756 The example I gave was from the book Would you mind elaborating if that does not trouble you, I still don't get it somehow
Tomohisa "Tom" Kanezaki · 2019-03-05 10:56
>>12757 >>12756 Oh, I got it - it was just a matter of phrasing sorry for this
Erik Johansson · 2019-03-05 16:57
>>12751 >I would drop SML. I really love the language but it has no ecosystem lol. Yah, I started doing my research and found this out pretty quickly (I probably should've started before posting here, sorry about that). >Erlang also has a solid ecosystem, concurrency is a language feature, and of your list it is (IMO) the easiest to reach a good level of skill in the shortest amount of time. Not too sure what the analysis/verification tooling is like though and depending on what you want to do you can run into performance walls. The vibe I got from Erlang is that the design of the language is really made with only fault-tolerance in mind. It doesn't seem to offer much in the way of correctness over Scheme, but I'm still considering it because as you mentioned it's simple, and fault tolerance is pretty neat! Also there is `Lisp Flavored Erlang' which seems to preserve all the desirable traits of Erlang while giving the language more expressive power and a more familiar syntax. (it's entirely possible I'm misunderstanding things here) >OCaml does, there is extensive software verification tooling, and there are levers you can pull to write really performant code. >Haskell from what I've heard is a similar story, there is a lot of energy in that community particularly with higher functional abstractions. OCaml (and SML) are a bit more down to earth in that regard. I think these are the two I'm really having to decide between. I'm leaning towards OCaml because of documentation, lack of language extentions, strict evaluation, a better FFI, & 'better' IO making it easier to reason about other peoples' programs and to write unix applications. This isn't a choice I'm making lightly as Haskell has a number of things I find really neat, like STM, typeclasses, and built in support for literate programming, but I've got to pick one for now. I also looked into other languages to consider and only Ada stood out to me. Even it doesn't really compare to the remaining languages here for my objectives. Anyway thanks so much for the reply lain, it's really helpful to get confirmation on my findings since I know so little about PLT and the languages available.
Void · 2019-03-09 01:49
I've been researching some beginner books, How to Design Programs 2e (racket), computer science an interdisciplinary approach (java) C Programming: A Modern Approach, 2e I've also looked at Smalltalk, Objects, and Design. But I don't really know which one to pick. I don't want to learn to loop through list and print to terminal, I want to "get" programming. Which programming paradigm is good to start with?
Acid Burn · 2019-03-09 02:27
>>12792 The book that inspired How to Design Programs, Structure and Interpretation of Computer Programs, has long been regarded as the best introduction to the theory of programming and computer science. However, it's seldom recommended anymore because it's quite difficult compared to other texts and is firmly rooted in the world of mathematics, which is off-putting to a lot of people. It's also not practically focused; you won't be making cool widgets in python or anything like that.
Turing · 2019-03-10 02:35
>>12617 >>12615 Coming back, I just refound a free book (guidetodatamining.com) I'd seen around and downloaded before that seems to teach some things I need for this (especially the last chapter about grouping looks like it'd be the exact thing), with a more hands-on approach. Had misinterpreted it as being for getting data out of websites and stuff like that, mining the data out of sources, instead of mining correlations and such out of the data. Seems more similiar to ore processing to me, not mining.
The Oracle · 2019-03-11 19:30
So my frustration of one never passed properly Prolog exam leads me to study Prolog onward. Some procreative anger, isn't it? But I decided to learn some quite official code - libraries of SWI-Prolog. So I see nth0_det(0, [Elem|_], Elem) :- !. nth0_det(1, [_,Elem|_], Elem) :- !. nth0_det(2, [_,_,Elem|_], Elem) :- !. nth0_det(3, [_,_,_,Elem|_], Elem) :- !. nth0_det(4, [_,_,_,_,Elem|_], Elem) :- !. nth0_det(5, [_,_,_,_,_,Elem|_], Elem) :- !. nth0_det(N, [_,_,_,_,_,_ |Tail], Elem) :- M is N - 6, M >= 0, nth0_det(M, Tail, Elem). Usually such code would be called low quality in any other language, but I see it rightaway in library code. I'd except such functions to be defined in the language the Prolog machine is written in, though I may be not right. Is that limitations of Prolog machine, example code for others to study, or it is the normal code? I'd except from a language which was claimed to be a silver bullet much more elegant code.
Otto Normalverbraucher · 2019-03-19 15:10
How come printf("%s\n", getwd(&buf[0])); works when the current directory contains Unicode characters ? Shouldn’t getwd return a wide string for this to happen ?
drop · 2019-03-22 01:14
Hello, I am hoping someone might be able to give me some direction because it feels like I'm getting nowhere fast. I've had a love-hate relationship with computers for years now. I jump right into it only to fail miserable after a while or relize I haven't learned anything. I've given everything from youtube tourtials a try to reading textbooks and if I keep withit it usually just feels like I am being told what to do with out real learning going on. The last thing I gave a whirl was SCIP but after a while I realized I was glossing over everything because it was too much for me. I would just really appericate some tips or tricks or even where I should begin.
Joey · 2019-03-22 02:04
>>12927 >The last thing I gave a whirl was SCIP but after a while I realized I was glossing over everything because it was too much for me. If that was the real reason rather than lack of discipline, try the watered down version of SICP for Python 3: http://www.composingprograms.com/ https://docs.python.org/3/index.html
Batou · 2019-03-22 04:43
>>11497 Not the quoted guy but I got interested. I already know the basics but learned using Pascal in my automation technician program because LPC, I guess. I'll also be learning Python in college in a few weeks. Do you recommend this book? Common Lisp seems like a "real" language and the book itself looks very didactic.
Trinity · 2019-03-22 16:38
>>12927 Accept the fact that you can get stuck for months on the same thing. You ll eventually break free from whatever topic you ve been studying and you ll have learned a bunch of unexpected things in the process. Also never neglect the theory. Those are my advices take them for what they are.
John Rain · 2019-03-22 21:05
Today I learned how to implement linked lists (singly, doubly or circular linked lists) as well as stacks, queues and sets. What are some small projects that I can work on to practice using those? Thanks lains!
Elliot Alderson · 2019-03-26 18:32
>>12942 Why not implement a pseudo-filesystem? https://stackoverflow.com/questions/19800917/creating-a-filesystem-implemented-as-a-tree-of-singly-linked-lists-in-java-usin >inb4 something something blockchain
renames · 2019-03-27 13:16
>>12942 A pragmatic and simple project is a small book-keeping register for balancing your checkbook. Have a file that you read that acts as a database which is basically just a serialize linked-list. Then append to it the new balance and whether it was a withdrawal or deposit.
cdr · 2019-03-27 20:50
The if ladder on my program is not executing at all. It skips over it no matter if 'l' or 'h' have been input and i don't understand why #include <stdio.h> int main (void) { char Control = 0; int Guess = 50; printf("Think of an integer between 1 and 100 and I'll guess it\n"); printf("If it's correct give me a 'y' and if it is not give me an 'n'\n"); printf("Is this your number?\t%d\n", Guess); scanf("%c", & Control); while (Control != 'y') { printf("\nit's your number [h]igher or [l]ower?\n"); scanf(" %c", & Control); if (Control == 'h') Guess * 2; /*This can't be right*/ else if (Control == 'l') Guess / 2; else { printf(":That's not an acceptable answer"); scanf("%c", & Control); } printf("\nit's %d your number?\n", Guess); scanf(" %c", & Control); } if(Control != 'y' || Control != 'n') { printf("That's not an acceptable answer"); scanf("%c", & Control); } printf ("Alright, thanks for playing"); return 0; }
Joey · 2019-03-27 21:25
>>13020 >Guess * 2; /*This can't be right*/ >Guess / 2; The computed values are thrown away without being stored anywhere.
Shogun · 2019-03-28 11:49
>>13014 >>13018 Thanks!
progn · 2019-03-28 12:55
>>13020 Like >>13021 said the computed values are thrown away (you calculate Guess * 2 and then you discard that value, because you never store the result of this calculation). The compiler probably had given you a warrning for this. My gcc gave me this: $ gcc -Wall -g -O0 main.c main.c: In function 'main': main.c:18:19: warning: statement with no effect [-Wunused-value] Guess * 2; /*This can't be right*/ ~~~~~~^~~ main.c:21:19: warning: statement with no effect [-Wunused-value] Guess / 2; ~~~~~~^~~ That said, there is a diffrent issue here. The algorithm is incorrect. Let say that someone is thinking about number 13. This would go like this: Is this your number? 50 n it's your number [h]igher or [l]ower? l it's 25 your number? n it's your number [h]igher or [l]ower? l it's 12 your number? n it's your number [h]igher or [l]ower? h it's 25 your number? ... and so on... into infinity (and beyond)
Guthrie · 2019-03-28 18:22
>>13021 >>13028 I see. I didn't thought this was the issue because on my debugger I was seeing the steps go over this whole loop like if it didn't exist so I thought the issue was the loop and not the math within it. It's an alarming behavior I should keep in mind for the future. I also use gcc as a compiler but it never game me any warnings, that's concerning. Well thank you all I will fix the arithmetic of the loop now.
word · 2019-03-28 18:55
>>13030 >never game me any warnings Try adding -Wall if you didn't already.
aliased · 2019-04-04 06:20
What's a good resource for learning about drone technology and developing applications for them?
Shogun · 2019-04-04 10:16
>>13109 search FPV DIY drone or racing drone DIY
Vasya Pupkin · 2019-04-13 07:02
How would you guys rate this Computer Science undergrad degree? http://scse.ntu.edu.sg/Programmes/CurrentStudents/Undergraduate/Pages/CS.aspx asking here since it's more appropriate