[ cyb / tech / λ / layer ] [ zzz / drg / lit / diy / art ] [ w / rpg / r ] [ q ] [ / ] [ popular / ???? / rules / radio / $$ / news ] [ volafile / uboa / sushi / LainTV / lewd ]

λ - programming

/lam/bda /lam/bda duck
Name
Email
Subject
Comment
File
Password (For file deletion.)

BUY LAINCHAN STICKERS HERE

STREAM » LainTV « STREAM

File: 1438207195941.jpg (549.53 KB, 1401x913, image.jpg) ImgOps Exif iqdb

 No.8007[Reply]

What are your favorite programming folklore stories? Stuff like the 300 mile email, the MIT magic/more magic switch, the first computer bug, etc. Here's a fresh one straight from my job:

We were working on a kernel-level video codec driver for Windows. Our demo method was to stand in front of a camera and move around, holding up different objects to see how it looked on our sample application. It worked great when it was just us, but whenever our boss's boss came over and stood in the frame, the PC would bluescreen. He would give us some time to work on stability and come back, and inevitably, the driver would crash as soon as he came in to demo.

After several occurrences of this, we finally figured it out. Our bosses boss, you see, typically wore bright striped shirts. Our codec was variable bitrate and performed best with simple colors and few patterns. Somebody brought in a shirt with bright stripes and put it in front of the camera. Instant crash.

We budgeted a buffer of 100 or so milliseconds of video with little wiggle room. When bright colors and patterns were encoded, the bitrate increased dramatically and the buffer overflowed, crashing the driver and bringing Windows with it. We increased the buffer size and the problem went away.

I'd love to hear if my fellow /lam/das have any similar experiences.
17 posts and 2 image replies omitted. Click reply to view.
>>

 No.10689

>>8007
Want to test your codec to the max?
Leafy trees blowing in wind - zoom into branches/tops filling the frame.
Or rippling water at a distance in the sunlight filling image. These things are always a killer test for video (as they approach, slightly, white noise like image conditions).

>>

 No.10711

>>9474
Man i remember this bug, i had it all the time.

rip those times ;-;

>>

 No.10751

Here are links to some of my favorite CS/computer stories:

1.) http://localroger.com/prime-intellect/mopiidx.html

2.) http://qntm.org/responsibility

>>

 No.12324

File: 1448337670283.png (63.42 KB, 728x595, AI.png) ImgOps iqdb

John McCarthy's Stanford website is full of cool stuff:
http://www-formal.stanford.edu/jmc/robotandbaby/robotandbaby.html

>>

 No.12336

Gosh! I wish this thread doesn't get abandoned. :\



File: 1447048898244-0.png (138.05 KB, 1048x1024, GNU.png) ImgOps iqdb

File: 1447048898244-1.png (89.59 KB, 1022x1024, Vim.png) ImgOps iqdb

 No.11743[Reply]

Let's talk about the text editors we use.

Do you use a common editor or something more exotic?

Are you using an exotic form of a common editor?

What are you looking forward to in future editor development, currently?
55 posts and 2 image replies omitted. Click reply to view.
>>

 No.12267

>>11743
Emacs + Evil for most of my programming needs (except Java), vim/nvim on the command line, via ssh etc.

Atom if I just want to quickly open/edit a file in a graphical environment.

inb4 "Atom so slow"

>>

 No.12297

>>12267
Why would you use Atom when you seem to be proefficient with both vim and emacs?

>>

 No.12305

>>12297
I only use Atom as my "graphical" kind of toy editor, this is by no means necessary, vim does the job as well, but this is fast (especially since I like to keep notes in .md files and atom has the preview out of the box and is quick to set up).Bit for fun and playing around, so me using atom is not that serious.
It was also turned out as a nice way to view and edit json files. For some reason, emacs chokes on json files with >1million words (opens and reads them fine, but pretty print buffer kills it =( havent figured out if this is just an emacs thing, I'd rather assume that it's because of the json package)


I use vim when I'm already in the command line and want to create a file or edit a file from there `vim file`.

I use emacs when I actually program and hang out in my editor for a longer periods of time, you know what I mean?

>>

 No.12309

>>11751

Jokes aside, I think both can be very "way of life"-y, just in different ways. Emacs folk tend to integrate everything into Emacs (mail, www, irc, etc...) whereas vim folk, at least the biggest fans, inject vim keybindings into everything: PDF readers, window managers, web browsers...

>>

 No.12310

I enjoy acme, although it's certainly an acquired taste.



File: 1448022136572.png (4.49 KB, 256x104, 120px-Haskell-Logo.svg.png) ImgOps iqdb

 No.12157[Reply]

Should I pick up F# or Haskell?

I really like C# and I want to be a C# developer later, but right now I'm looking into functional programming as a hobby, could you help me decide, lainons?

F#
+I can use .Net
+Closer to my original domain of knowledge
+The company I'm interning is using it, could earn me plus points if I go for full-time here
-Not purely functional
-Questionable application outside the windows realm

Haskell:
+Great, sexy syntax
+If I could not get work advantages from F# I would instantly choose this
+Community seems cool, many tutorials and resources
Post too long. Click here to view the full text.
27 posts and 2 image replies omitted. Click reply to view.
>>

 No.12290

>>12256
>the next version of ocaml will bring non-GIL multi-threading

If Ocaml can do it, Python should be able too right?

>>

 No.12294

>>12290

Wasn't that why stackless python existed?

>>

 No.12299

>>12259
>design pattern
Gross.

>>12260
>>12264
Let me rephrase that: Things I don't know about functional programming are unnecessary.

>>

 No.12301

>>12299
You are unnecessary.

>>

 No.12303

>>12229
>it's lazy typed
Heh, I think you meant statically typed and lazily evaluated (by default).

>>12236
That's very inaccurate and misleading.

>>12256
Enjoy your impurity, kafir.



File: 1447595185029.png (369.04 KB, 636x479, courtmartial_01.png) ImgOps iqdb

 No.12004[Reply]

So, anyone else here who like to read old "obsolete" books on programming?
21 posts and 5 image replies omitted. Click reply to view.
>>

 No.12076

My Uni's library has a collection of Journal of Computer Automata, each a selection of important cs papers since the late 40's.
It's both interesting and disheartening seeing the incredible amount of optimism old timers had for computers their applications. Plus all the adorable ads for card punches and drum memory...
I can try to snag a couple scans, if anyone wants... Maybe throwing up misc table of contents, then taking requests.

>>

 No.12077

>>12076
I'd love to see those ads on punch card and magnetic cores

>>

 No.12123

>>12067
There is no such thing as paper recycle. At least worst you get only bad paper.

I'd love to get my hands on old books and magazines with BASIC listings and convert the programs to C as an exercise! :P

>>

 No.12266

>>12029
W-What is OOAD, lainon-kun?

>>

 No.12268

>>12266
"Object-oriented analysis and design" I don't think that they were referencing a certain book



File: 1446906982148.jpg (98.24 KB, 763x427, lisp.jpg) ImgOps Exif iqdb

 No.11649[Reply]

What do you think about Object Orientated (OO) languages? What are their pros and cons? Do they add unneeded complexity without any unique advantages or do they empower programmers to think in an abstract way while reusing code?
12 posts and 2 image replies omitted. Click reply to view.
>>

 No.11686

>>11678

sorry for being naïve -- is this a real quote? I want it to be true

>>

 No.11691

>>11679
>like 8 books of "data structures in X language"
dif guy but i'm pretty much language agnostic if its C-derived (and I think most people are?)
which one is actually the most efficient and concise at explaining data structures
since they're all dif authors

>Little Brother

>Wiki: The novel is about four teenagers in San Francisco who, in the aftermath of a terrorist attack on the San Francisco–Oakland Bay Bridge and BART system, defend themselves against the Department of Homeland Security's attacks on the Bill of Rights.
anon what

>>

 No.11697

>>11673
>>11677
If you're a complete beginner, Sedgewick, Wayne: Algorithms; TAOCP and CLRS are great as a reference once you get the hang of the basic concepts and want to look something up when working on some problem.

>>

 No.11705

>>11686
it's from "anime was a mistake" meme

>>

 No.12150

>>11697
This guy also has an algorithms book in C. Any thoughts on it? I already have enough languages to learn and I'd rather have to add C than Java.



File: 1446604413095.jpg (126.09 KB, 480x622, vertical.jpg) ImgOps Exif iqdb

 No.11421[Reply]

Perhaps I've been looking in the wrong areas, but it seems that most common programming guides instruct new users the basics, then how to design software for use in phones and computers; phone apps, operating systems, macros, calculators. All of the aforementioned things are great and I use them every day. However, my immediate reason for teaching myself to code is to design automated and remote-controlled versions of production systems such as greenhouse pH and humidity controls.

Are there any recommended books or guides explicitly for writing programs that communicate with non-computer machines? I'm currently learning both C and Python for this purpose.
18 posts and 4 image replies omitted. Click reply to view.
>>

 No.12083

>>12063
>temperatures
>high level

lol

>>

 No.12085

>>12075
you can do it in another language if you have some kind of compiler that translates your high level code into C using the libraries and features for the particular mcu architecture you're using(like using MATLAB to design control systems and then implement them in an arduino with their code generator). However, in order to take into account certain details and optimizations, a thorough knowledge of C, assembly is a must if you want to understand better how the mcu works. You can't simply a code monkey for embedded stuff.
To further expand, you(or some other anon) talked about only caring for temperatures, not the RAM. However, temperature values do no take an infinite range of values, and cannot be represented in a computer with 100% precision(do to the digital nature of computers). Knowing how registers and data type works help you asses how to manipulate the temperature reading your sensor throws at you, it lets you know that needing more precision means shrinking your range of values you can represent and viceversa in a constrained environment.

>>

 No.12096

>>12066
not that I recommend it, but you can do usb/serial communication and gtk widgets from within PHP so, all you need is the linux kernel and your favorite interpreter

>>12085
The error margin of the sensor is probably bigger than the error introduced by rounding the value to the next 32-bit integer. And Python can handle arbitrary precision numbers.

>>

 No.12104

>>12096
Most sensors are built with the capacity compensate for measurement and/or internal errors. If not, they're documented in a datasheet and you can make the calculations to compensate. For real-time applications, Python is sub-optimal on itself since it's a interpreted language unless, again, you have a C code generator or a compiler for Python. That's okay if you're going to do complex stuff but if all you want to do is read from sensors and display them on an lcd, then just learn some C and get it over with.

As for your other point, you can definitely do that if you use a microcomputer like a Pi. You can read tru serial and display it on a monitor or something. In that case, you don't necessarily PHP, just any language you're familiar with.

>>

 No.12124

>>12104
>Most sensors are built with the capacity compensate for measurement and/or internal errors. If not, they're documented in a datasheet and you can make the calculations to compensate.
Yeah, but like he said. The error margin is going to be bigger than anything introduced by floating points. What kind of plant suffers from a temperature less than a few degrees of?



File: 1444175094330.png (4.74 MB, 1580x2580, Game_Boy_Color_-_Purple_Mo….png) ImgOps iqdb

 No.10223[Reply]

hi, lainons.
i just recently got a flash cart for my gameboy, & i've been searching for an lr35902 assembler for freebsd or os x, but so far, all of the information i've found is unreliable, any help?
16 posts and 2 image replies omitted. Click reply to view.
>>

 No.11904

>>11868
sounds good.
best of luck to you.
anyway, i haven't really been able to make much progress, there's been a lot of important soykaf jumping in the way :P

>>

 No.11935

You are about to learn some really cool things.

>>

 No.12003

>>11935
LD is really generic.

>>

 No.12007

>>10487
I've got zero experience with assembly but I want to get into this, will I be way in over my head?

>>

 No.12103

>>12007
>will I be way in over my head?
Probably.

Assembler languages are almost always very basic. You won't get much help with anything abstract.

You should try experimenting with pedagogical assembler languages first, like the Little Man Computer or with GNU MDK:
http://elearning.algonquincollege.com/coursemat/dat2343/lectures.f03/12-LMC.htm
https://gnu.org/software/mdk/



File: 1446244063159.png (186.72 KB, 600x450, cmonks.png) ImgOps iqdb

 No.11201[Reply][Last 50 Posts]

Happy Dennis Ritchie Day, Lains!

Pay respects to your lord and savior for creating the greatest language of all time: C.
111 posts and 13 image replies omitted. Click reply to view.
>>

 No.11982

>>11967
>There's obvious limits on what you can fit in so much space, but I still don't think so many programs need to be 50,000 lines or however long. If you want a concession, I seriously doubt any program I use needs to be more than 10,000 lines long.
How do you read and post to this website? cURL running on an rtos?

>>

 No.11987

>>11982
>How do you read and post to this website? cURL running on an rtos?
I currently use Firefox. I really hate it. It crashes constantly.
Lainchan is one of the only websites I use anymore and certainly the only one that I have problems browsing with links or eww.
It has a simple API, so I have considered building a utility specifically for using the site. I'm busy with a few other things though, so it's on the back burner.

>>

 No.12059

>>11201
>reading through k&r
>word count program
>copy code to the letter
>compile and run
>the word count of "Hello world": 1431706545
the fuarrrk?

>>

 No.12061

>>12059
nvm forgot to initialize

>>

 No.12097

File: 1447863091816.jpg (222.89 KB, 900x675, 1434472323789.jpg) ImgOps Exif iqdb

>>11309
You have successfully cracked the patter in posts where people fake knowledge in the topic.



File: 1447199525462.jpg (173.62 KB, 500x333, free-rap-beats-for-not-com….jpg) ImgOps Exif iqdb

 No.11839[Reply]

So there's a really sweet commercial IDE that's free when you doesn't use it for commercial purposes. So you use it to code easier.

Then your iOS or Android program is ready and you re-compile the source code it on compiler that doesn't have the same restrictions.

Anyone with two co-operating brain cells can realize that you used the non-commercial IDE to make it easier for you and only used the other compiler in order to not make any formal errors.

So when will they charge money? After you started make money on the program?
9 posts omitted. Click reply to view.
>>

 No.11991

>>11916
>COBOL devs make mad cash cause crazy job security. Some important legacy software is COBOL like the wall st stock exchange.
Yeah, but mobile devel with COBOL just sounds like insanity

>>

 No.12005

>>11991
Why not? COBOL + SQL in some kind of shell would be pretty cool.

>>

 No.12008

>>11916
>COBOL devs make mad cash cause crazy job security. Some important legacy software is COBOL like the wall st stock exchange.

Yeah except those people have been programming cobol for 40 years. I imagine that is partly why they have job security and high pay.

>>

 No.12065

>So when will they charge money? After you started make money on the program?

After software patent laws and copyright laws make that hilarious system valid.

>>

 No.12095

>>12065
Ever heard about the Unreal SDK? Free to use with all features, but if you make more than $3K per quarter, they will have a 5% cut.



File: 1445922290982.jpg (5.81 KB, 250x250, 1432963000851.jpg) ImgOps Exif iqdb

 No.11025[Reply]

Didn't see a C++ thread, so thought I'd start one.

What's λ working on?
18 posts omitted. Click reply to view.
>>

 No.11629

File: 1446871295532.webm (3.52 MB, 640x360, cell.webm) ImgOps iqdb

What do you guys recommend for learning C++?

>>

 No.11630

File: 1446872106726.jpg (417.76 KB, 1600x900, 1445276930660.jpg) ImgOps Exif iqdb

>>11629
Specifically, to be self taught?

Basically, I have about 8 months to learn it. I want to become as good as I possibly can in that time.

>>

 No.11632

>>11630

Write *big* projects.

For eights months, I would advise these fews :

-If you're not already fluent in data structures, implementation of all most current data structures : lists, heap, red-black tree, hash table...
-Snake game you feed a .so shared library. This library will provide all the graphics functions for rendering the game. So, with the same binary, you can have different graphics using different library. Do at least 3 library, one rendering a 2D game with SFML, one rendering a 3D game with OpenGL.
-FTP server
-IRC client/server. Any client must connect on your server. Your client must connect on any server.
-Survival game where AIs scavenge for food in a 2D space. Train AI with a neural network and a genetic algorithm (doesn't need too much maths).

>>

 No.12079

>>11632
These are great recommendations, any others?

>>

 No.12090

Some C++ resources here, for a whole advanced course, not meant to be a first programming course
http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2416
Click tutorials and lectures.
I havent done it yet but typically these resources are very good. Solutions are locked though...



Delete Post [ ]
[ 1 / 2 / 3 / 4 / 5 / 6 / 7 ]
| Catalog