[ art / civ / cult / cyb / diy / drg / feels / layer / lit / λ / q / r / sci / sec / tech / w / zzz ] archive provided by lainchan.jp

lainchan archive - /λ/


[ Catalog ]

File: 1491961737986.png (860.09 KB, 232x300, zuserechnenderraum.png)

No.1 [Reply]

This is new /λ/, also addressable as /lambda/, the programming board. The intent is that this board will be used to share and discuss programs that have been made, for techniques and tools to be written of, and so other programming topics can be debated.

This is not the board to recruit programmers for projects. If you have a project you want to discuss, have a good bit finished beforehand.

Relevancy is considered very important in this board. It is expected that every image and file will be strictly relevant to programming.

Use tags for submitting programs inline with your post. To use code tags, use the [tag]...[/tag] syntax, where tag is code.

Hack deftly; document creatively; crack happily. Debug carefully; backup often.


File: 1492025919560.png (35.36 KB, 300x225, serveimage.jpg)

No.10 [Reply]

Rust general, share resources, PDFs and experiences with the language.
7 replies omitted. Click reply to view.

  No.687

>>608
>Pluralsight
Are you for real? Why the hell would you recommend that out of the myriad of FREE resources available elsewhere?
Get out of here. You are advertising.

  No.696

>>687
If everyone used free resources than no one would bother to write and publish books. Notice we have a book thread on this forum...gee, I wonder why people still read published books when they could just use all the crappy free online tutorials? Well maybe people are not living in mom's basement like you and actually have to learn this stuff for school and work.

Also video courses on Lynda and Pluralight can often be a faster and easier way of learning than books. So leave your stupid opinions to yourself, there are people here who are actually trying to get work done.



File: 1444226503649.png (391.14 KB, 240x300, virtual_boards_in_CatChan.png)

No.10247 [Reply]

I released CatChan script which equipped a virtual board function.
Try and enjoy it. You can download it from BETA.
https://raw.github.com/Dogman8/CatChan/develop/CatChan.user.js
Any feedback is welcome.


Easiest way to use:
1. Click 'settings'.
2. Click 'load default', 'Click(I want to ... now)' and 'Click(...for lainchan)'.
3. Reload.
4. After 5 secs delay, it starts to scan entire site, generates virtual boards and show them. This takes 5-20 secs.
5. Click #XXX to on/off virtual boards. They are toggle buttons, so you can select multiple boards.
6. After 10 mins delay, auto updater will run and color tags if they have new posts. Favicon is also changed, and popup shows counts of unread replies to you, unread replies, threads which have unread replies, threads in the virtual board, boards to which these threads belong respectively.

How it works:
You can add tags to a thread when you post #XXXX in your comment. CatChan scans all posts in all thread in all boards, aggregate, and shows it in catalog. Tags are bumped and discarded in usual manner. Details are configurable.

Virtue of virtual board:
You can choose which thread belong to which board. And also threads can belong to multiple boards. You can make virtual boards at any time. This gives extreme flexibility to threads. Threads can move between boards at any time virtually.
Virtual boards function is a super-set of 'physical boards', which is used now. If you limit max num of tags to 1; threads can only inherit a tag which has the same name of physical board. In this limitation, virtual board system is equivalent to physical board system. Virtual board system is a search engine by user tags simply.

Note:
Other information are available in below, but they are obsolete.
https://8ch.net/scriptcdc/res/59.html
https://8ch.net/scriptcdc/res/61.html
https://8ch.net/scriptcdc/res/63.html
https://8ch.net/scriptcdc/res/58.html

Status:
Now the script needs to be debugged still, but basically it works.
Bug reports are also welcome.
Threads are sorted by 'Last reply' now even if you set it 'Bump order', because catalog doesn't give bumped time, so I had to scan to get them and I haven't implemented yet.

Compatibility:
It works well in lainchan and 4chan.
It works but too slow in 8chan.
I haven't debugged in Krautchan.

Tags for example:
#CatChan, #virtualBoard
82 replies omitted. Click reply to view.

  No.21089


  No.21551

I released an update. Test modes were changed to opt-out. DON'T USE TEST_MODE64,65,67. YOU MUST UNCHECK THEM IF YOU USE THE FUNCTIONS.
https://raw.github.com/Dogman8/CatChan/develop/CatChan.user.js

Notes: (Rewritten)
1. DON'T USE TEST_MODE64+65+67. POLARITY WAS CHANGED TO OPT-OUT.
2. Don't use test_mode78.
3. Fixed.
4. Fixed.
5. Standalone mode may be added in the future. Now you must open some chan to open archive, and threads from archive will be merged with them.
6. UI may be changed.
7. When you use "Full_IDB" mode to detect deleted posts, the script finds deletions during both offline and online. When you use "Full" mode, the script finds deletion only in online.
8. When you use "Full_IDB" mode, the script guarantee to find all deleted posts if you once see and store them to IndexedDB. The script can't find deleted posts if both their makings and deletions were done during offline.
9. You may have to reboot your browser when you make archives to files because the chrome has memory leaks. It starts to be slow about over 5000 download files.
10. Inter operability with dollchan's archive will not be implemented. Dollchan tweaks HTML so much, CatChan can't read it. However, CatChan can read your archive of Ctrl+S.
11. Fixed.
12. Fixed.
13. You can restore threads in your archive as other threads explicitly when you use test_mode 80. This might be helpful for you to understand how CatChan's archive works.
14. Fixed.
15. Fixed.

As I stated, I'll leave here. No update release will be made here. I look down the appleman, λx.x and all other mods here, see >>>/q/12145 and later if you want to know details. But I respect USERS, so I'll accept requests from users. Visit meguca if you want to contact with me. And you can catch updates in GitHub also.
https://meguca.org/g/1841607



File: 1446031423306.png (39.77 KB, 300x300, good habits.jpg)

No.11083 [Reply]

What habits should each coder have to make his programing as clean, effective, good as possible?
I'm just starting to learn programming, Python on 2.7, and want to develop good habits from the beginning instead of adopting them later and possibly having to get rid of bad habits.
any ideas?
97 replies omitted. Click reply to view.

  No.19487

>>19474

I use Beeminder (a site where you pre-commit to do more or less X per day) and Rescue Time (a site that tracks how much time you spend using various applications).

I have a goal like 'Do more than 4 hours programming per day' and drive it by the amount of time I spend using atom, my text editor.

It's not a perfect system and 'time using editor' is not a perfect metric, but it has helped me to increase my productivity.

Do you experience video game addiction? I have for many years. I plan to spend the weekend reading a book or coding up a new idea, but instead I spend 32 hours playing Europa Universalis. Beeminder has really helped me here - I created a 'do less' goal to force myself to play no more than 14 hours per week and I use Rescue Time to provide the data. This has really helped me a lot to use my time more efficiently and to combat my depression/self-loathing.

If you have trouble with akrasia or procrastination I seriously recommend giving Beeminder (or similar pre-commitment tools) a try.

  No.19488

>>19479
>>19481
>>19487

Same guy.

Thank you, from the heart. I'll consider allocating a fixed amount of time to program inside the editor (Vim, of course!), check the books you suggested, and the 2 services Beeminder and Rescue Time.

Will hopefully update in a week if my situation got better.

Also >>19487
Yes. I did experience video game addiction. Which got me into assembly and modifying stuff, which got me into programming and gave me decent WPM.



File: 1446461486453.png (50.32 KB, 300x187, Hp16c.jpg)

No.11339 [Reply]

HP-16C is the only HP calculator for programmers. However, some calculators, such as the HP-42S, has incorporated its functions.

The company SwissMicros (aka RPN-Calc) has released clones of the HP Voyager series.

My questions are:

Have any Lainon been hepled in their programming by using a HP-16C or any other HP calculator?

Has any other companies released calculators for programmers?
53 replies omitted. Click reply to view.

  No.19343

I use an HP 35s. Not as nice to look at as the 16C but the buttons feel good and it has a lot of useful features. I don't use much of the "scientific" stuff. Generally I do base conversions for networking or maybe some trig if I'm doing radio things.

I use it the most for very pedestrian things like when I'm calculating my bills or playing a tabletop game with friends. I have it because I prefer RPN to other algebraic notiation.

If I use my computer instead, I use dc (1) or whatever REPL I happen to have open.

  No.22839

I have an old TI-Programmer that's older than me.



File: 1447048898244-0.png (138.05 KB, 300x294, GNU.png)

File: 1447048898244-1.png (89.59 KB, 300x300, Vim.png)

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?
298 replies omitted. Click reply to view.

  No.20970

>>20968
It's awkward when you realize that you had no idea what was going on in the thread for 24 hours, despite participating...

  No.20985

can you underage hipsters just use real IDEs like the rest of us

thanks



File: 1449188479455-0.png (251.53 KB, 300x197, underwater_room.jpg)

File: 1449188479456-1.png (415.31 KB, 300x169, technoshaman.jpg)

No.12467 [Reply]

Most of us have heard how amazing the Lisp machines of the 80s were, an operating system dedicated entirely to human-computer interaction and abstraction.

What I've noticed that myself and other lisp hackers end up doing is living out of an CL+Emacs ecosystem, bringing environment variables into the runtime from async shell calls, SBCL native handles etc, into S-expressions or M-x commands which turns these hooks and system objects into objects in our lisp environments.

I do this with my browsers as well, bringing DOM objects in from javascript compiled to from ParenScript Lisp (Common Lisp -> Javascript)
https://github.com/olewhalehunter/kommissar

This is all fine and well until you want to run your system on another machine or your computer crashes and you find yourself setting up your desktop from scratch.

I propose we collaborate on abstracting Linux system hooks, various windowing environment utilities, and any command line programs we use into the SBCL runtime, creating a portable Lisp virtual machine with the possibility of bootstrapping an even more powerful version of Emacs from the result.

Macros can then be created at a system level, we can even bind statistical data on command usage and create command topologies to speed up personal automation or even collaborate on distributed machine learning/AI systems.
89 replies omitted. Click reply to view.

  No.19939

>>19770
I'll be following this.
I prefer scheme but I use stumpwm and would definitely play with this if it comes to life.

  No.19990

>>19939

found this today

https://en.wikipedia.org/wiki/Scsh
https://scsh.net/about/about.html

>Scsh is a POSIX API layered on top of the Scheme programming language in a manner to make the most of Scheme's capability for scripting.


seems very barebones but it's become a popular bind on unix in the boston-centered Scheme community



File: 1449955749813.png (68.06 KB, 300x225, coplandos.jpg)

No.12688 [Reply]

Given Cortana and Siri (and others) becoming smarter and smarter, what's keeping anyone from creating a linux OS with voice recognition integration?

I'm proposing a Navi-styled linux OS, which has voice commands for everything you can do normally with a keyboard

Obviously, voice recognition software is very finicky and often not as good as a real interface, but it seems that the technology is approaching the point where it's actually usable.

So our questions are:
>What are the open source/free options for voice recognition software?

>What are the problems of these, and how can we improve upon them?


>And how can this software be integrated into the operating system, in a stable, usable, and efficient way?


The most mandatory things are turning it on by saying hello and playing a track
Oh, and naming it "navi"
109 replies omitted. Click reply to view.

  No.20514

>>20510
Voice is annoying, but itd be cool to have a terminal chatbot thats also smart enough to preform some tasks.
Though the chatbot part'd be more fun, really, but being able to actually do stuff would provide a veneer of practicality and purpouse that'd make it feel less like a toy to be used temporarially and thus feel cooler.

  No.20567

>>20514
My fictional inspiration are the netnavis from rockman.exe series. They represent the user's alter ego and exist in devices that correspond to our smartphones. They can enter computer networks and manipulate the devices within.

The comfiest part of it is how everyone has one. It's normal. They're people's friends. I really like this social aspect even if its because it's a children's video game



File: 1492029822151.png (90.3 KB, 300x300, 61SA0Wq1P1L.png)

No.13 [Reply]

Python 3 general.

Share resources, PDFs and books. Also discuss and share projects you have been working on.

Beginner Questions are also welcome.
51 replies omitted. Click reply to view.

  No.689

>>661
ToDate isn't doing what you say is in the source, since its returning 0 for y=1995, which can't happen with the definition you give (because of the OR). Either that or ToDate is changed later in ch1progs, so please do >>671

  No.690

>>644
>>645
>https://w1r3.net/RXrjQd.txt

>partial_octet = 0xff & (0xff << (8 - network_bits % 8))

This way is fine as well, the point was to get rid of the loop. My suggestion was:
((1 << x) - 1) << (8 - x)
which doesn't need a final masking because it generates exactly the needed bits.

>it needs more iterations

Traversing the data matrix in either row major or column major order produces the same number of data accesses. You also get the same number of length comparisons.

>lengths = [len(row[index]) for row in rows]

>column_widths[name] = max(lengths)
You don't need to store the lengths and compute the max afterwards. You can use a single pass [1]:
column_widths [name] = max (len (row [index]) for row in rows)
You can also do the entire length computation in one go:
lengths = [max (len (row [col]) for row in rows) for col in range (column_count)]

># O(2nc)?

Order of growth notation and analysis both ignore multiplicative constants.

>column_widths = {}

Dictionary lookup by key is much slower than list sccess by index. You only need the dictionary for the format call, so you can compute the lengths in a plain list, by column index, and create the dictionary afterwards. This should be a dictionary comprehension [2] combining the length and label lists using the zip [3] built-in.

[1] https://docs.python.org/3/reference/expressions.html#generator-expressions
[2] https://docs.python.org/3/reference/expressions.html#dictionary-displays
[3] https://docs.python.org/3/library/functions.html#zip



File: 1451510537456.png (24.28 KB, 300x120, ipfs-logo-white.png)

No.13109 [Reply]

Anyone familiar with the InterPlanetaryFileSystem?

Its a neat protocoll, based on torrents, blockchains and git that aims to replace the internet.

In practice its a nice tool to distribute all kinds of files, websites included.
The difference is that there is no single point of failure. And it is protected against sybill attacks (for those that care).

It is based not on resource location but on resource content. I.e. if I go to www.google.de/InterestingImage.png my browser will always give me whatever is at that location, be it the google logo or necro horseporn.
IPFS uses SHA-256 hashes instead. So the resource links that take the form of easy to remember strings like QmWsmdwbd2NLgyyB7FHLCCd3Qu8F7kXk19eZAdKGyFTdqv will always point me to the file whose hash corresponds to that value. Changing even one bit will yield a completely different hash.

The closest equivalent would be I2P or GnuNet, both extremely slow (as in pre 5,6kb/s slow)

Now the interesting part, how to get started.

First go to:

https://ipfs.io/docs/install/

download the binary for your platform, unpack and move to that directory. (I will assume you use Linux or a Linux-like OS during the following steps)

Inside that directory, make sure that you have set the execution rights for the .sh file, run it as sudo or su to install.

thats it, you have now installed IPFS on your computer.
Except its pretty useless as it is right now.
We need a few more steps.
First: add a repository, that will be where all the files and chunks of files will be saved.

you can do this using the following line in the Bash:

 export IPFS_PATH=/home/YOURNAME/ipfsTestDir/ 


this will create an IPFS repository inside this directory (the directory should exist and you should adapt your name of course).

Then you might want to add a bootstrap, a known address from where your IPFS installation can access the whole IPFS swarm, i.e. everyone else who has IPFS.
Like so:
 ipfs bootstrap add /ip4/45.55.151.20/tcp/4001/ipfs/QmdkJZUWnVkEc6yfptVu4LWY8nHkEnGwsxqQ233QSGj8UP 

this is the access point of ipfspics: https://ipfs.pics/

Now initalize your IPFS:
 ipfs init 

(you can skip the export PATH and bootstrap part, in which case IPFS will use the default /.ipfs directory in your home directory as repository)

Now, to enable others to access the files you have added to IPFS (no we have not yet added anything, be patient pls) start the IPFS daemon in a terminal windows which you do not need:
 ipfs daemon 

(you can see that IPFS is legit rocket science here)

Now you can add files to your repo, for simplicity sake we will add a whole directory instead of file by file:

ipfs add -r /home/YOURNAME/TESTDIR/ > ipfsHashes.txt

As above, replace with your username and whatever nonempty directory you want to add to IPFS.
the ">" is of course a redirect, so that all hashes are neatly saved to a textfile, making the much easier to remember.

Congratulations, you just shared some files over IPFS.

A few neat tools to make your life easier:
The chrome/firefox addon "IPFS Gateway redirect", great for accessing IPFS stuff over your browser, works if the IPFS daemon is running in the background.

The link http://localhost:5001/webui
A more noobfriendly userinterface in your browser.
And of course the website of the project: www.ipfs.io with tons of resources to familiarize yourself further.
(the mailing list is especially nice, everyone is friendly and Juan Bennet, the inventor of IPFS is often active there)

Of note is that IPFS is still in alpha-stage, 0.3 to be precise, so expect bugs.

See next post(s) for a few files I am sharing, mostly books.
159 replies omitted. Click reply to view.

  No.22371

>>13168

Can the immutable object be something that contains links to other immutable objects? Or a blockchain that references objects in the d's?

  No.22789

Worth mentioning that 0.4.8 is out which includes the long awaited filestore code (IPFS doesn't need to make a second copy of the data anymore), unixfs directory sharding, and private IPFS networks.



File: 1452545510031.png (158.6 KB, 299x300, wizard.jpg)

No.13410 [Reply]

So, how you do to be a great programmer?
In my opinion most of you guys know much more about the average programmer that I know. Even i get really suprised with some things that you guys do. I always had this feeling that Im far way behind from you guys. So I just took the scip book and im willing to learn as much as possible before the uni classes get back.

I really wanted to hear some stories and tips about how you guys got good at programming.
155 replies omitted. Click reply to view.

  No.19848

>>19837
I'm aware that the wording was misleading, but am also aware that effectively means ASCII or EBCDIC. Assuming a length is roughly equivalent to assuming an encoding, for most purposes.
I should've worded that more carefully, as I suppose it appears that I was being ignorant with that.

>>19838
>You seem to fetishize portability. Talking about DOS and complaining that UNIX is old.
I like portability for languages that encourage it, such as Common Lisp, APL, Prolog, and others. Languages that don't encourage perfect portability, such as Forth, are also fine. There's nothing wrong with targeting a specific environment for efficiency in, say, an embedded software.
>I'm all in for diversity in programming languages, yet you seem to want to shut down completely a whole family of them because *you* don't like it.
I suppose. I'm ultimately only offering my particular opinion.

>Well, how else is that supposed to happen? That is inherent to using the same system in two different operating systems, it represents the least effort necessary.

I suppose that was unfair. I concede that quip about porting. There's not yet a good way to port operating systems or at times language implementations without manual effort and there may never be. I didn't think through that properly.

>Then again, you don't need to specify graphics down to the metal, but merely the semantics and a programmer's interface for their use. There's, for example, a difference between OpenGL and SDL. Same goes with networking, same goes with threads.

The ANSI Common Lisp standard would've done good to specify optional segments, such as the ANS Forth standard did, so features could be used portably when feasible. Threading would be fairly obvious and networking could've specified how to support different protocols a standard implements.
I'm still skeptical that graphics could be given a portable interface, however.

>I was quite annoyed that threads aren't suported by my multithreaded OS, even though I compiled with thread support, so much for your portable language.

Unfortunately, threads are inherently not portable in Common Lisp. They belong to the class of language features macros can't add.

>You can't isolate yourself from the world.

That's false.
>and staying confined to their own domains despite claiming to also be the most general purpose languages out there.
I never made that claim.
>Then you come and tell people to disregard a whole family of languages with which stuff can be done in favor of writing programs that are bacwards compatible with DOS because unix is stuck in the 70s
I only mentioned DOS because that's a platform that Common Lisp can be ported to. My point was that Common Lisp is the common Lisp and can work uniformly on any machine because of its decisions.
In fact, there's nothing restricting any of the languages I've mentioned from working on most any platform. APL was used to define hardware in the past and I need not write of the portabliity of Forth. Meanwhile, APL gains little from platform-specific features, whereas Forth is expected to use a platform to its fullest extent, disregarding portability.

>>19840
>And lastly (I'm not going to complain further, because this is my ultimate issue with the elitist /λ/ mentality), you think you're being super helpful, but you're really doing quite the opposite. It's not all about the fun anymore, but about holding crazy artificial standards.
I don't see how this is elitist. I merely have a different opinion.
>I wouldn't mind you having your own opinions but trying to push what seems like an agenda and the constant reminding of this (yet) unattainable idea without an alternative...
>Do as you like regardless, I know lainchan is a sort of echo chamber anyway
All I'm doing is giving advice, the same as you. Someone will read this discussion and come to their own conclusion. I suggest this is better than a discussion in which there is no other voice with different advice.

Regardless, yes, I suppose this particular discussion in this thread is done, but someone else will probably question my advice, as they've done before.

  No.19850

>>19846
Yeah, Racket's pretty cool. I lean to the CHICKEN side myelf. CHICKEN doesn't have threads (it does have green threads, but that's not the same thing at all). However, the rest, especially FFI and networking, is excellent. Irregex works great for regexes, although it's slightly marred by incredibly verbose function names (which you can change)

If you really need threads, guile is also a good choice. Cyclone may also be, one day, but it's really mostly a toy for now.



File: 1454796710187.png (40.91 KB, 300x225, the_box1.jpg)

No.13958 [Reply]

Someone in the Lisp thread was talking about how CLIM is thought to be dead, but just received a patch. Also, CLIM's examples have worked flawlessly for me. This is weird.

I created a list of things that I would expect to be true about a dead project. None of them seem to capture the actual meaning though.

Nobody is developing the code.
Nobody is using the code.
Online resources are no longer available.
There is no active online community.
The code will not build.
The code will not run.

What does 'dead' mean? Why and when is the word used?
8 replies omitted. Click reply to view.

  No.18980

It means the code is either not changing or not running.

  No.18982

>>13993
That's pretty close to dead. You don't need users to have a hacker playing with his/her code to get it to do what they want. Most large projects started out as small, "scratching my itch" projects that garnered interest for one reason or another.

However, we then have packages like Nethack, that receive updates very rarely and yet, there's still a community around it.

apulse may be accused of the same; it may not see many updates these days (not sure, but last time I checked it had been a while) but when something works, you go into maintenance mode and just make sure it works with the latest version of the libraries that you use. Many people consider those projects dead; I consider them mature.



File: 1457852627523.png (189.6 KB, 300x297, monitor_by_endling-d7wrd5u.jpg)

No.14642 [Reply]

What's up with filesystems?

I mean, I get that block storage is good for speed, and for drives with high random read latency. But do they still make sense now that ssd's and shit-tons of ram exist?

Binary formats make it so much harder to deal with file formats. Hell, even ascii formats like STL are shit.

I'd like to see something that works like a giant object.

Do selections like

for line in filesystem['home']['anon']['.bashrc']:
do_some_soykaf(line)

Alright, bad example, since bashrc is just a nice pipe-able ascii file.

You could implement something like python's duck-typing. Store an image compressed, but have a daemon take care of presenting it as if it were a pixel array. Do some clever things with shared memory (capnproto?) and you could be editing the same image in different programs, at the same time.

I suppose we could all just save to JSON, but saving to a block is slooow, along with all that serializing.

I'd much rather someone implement a good kbd-tree server. Because then we can let more then one program access the data structure at once, and implement things like callbacks if the data changes.

Binary formats and GUI programs sort of broke the unix way. But we can move back towards letting one program "do one thing well" by letting more then one program access a datastructue at once. Something that block files don't allow.

Throw in some network transparency and you've got a pretty great distributed computing platform.
33 replies omitted. Click reply to view.

  No.20027

File: 1478473882662.png (247.49 KB, 200x200, death_of_block_devices.pdf)

>>20015
>>20024
>>20025

also it's called "block device" for reason. if one wishes to write said program by directly talking to disk controller's interface :

(pages: 512 to 4096 bytes per page
blocks: 64 to 256 pages per block)

1. reads and writes are performed at the granularity of a page

2. a block must be erased before any of the pages it contains can be overwritten

3. writes must be sequential within a block.

which is not issues while creating filesystem or using created filesystem but sever limitation to
>persist language's data structures .

again, check out how real db implementations deals with them(for block devices), they are not exactly human friendly structures.

BUT

if you can throw this "hardware" side limitation out of the picture, you get locality of RAM; there's no functional difference between ram and secondary storage in terms of accesses.

in theory, there's no reason ssd to act like block device and there's lots of talk about what should be next abstraction for them. or do we need abstractions at all.

attached paper is something all we'll have to consider to some point.

  No.20047

>>14969

I've also had this idea. It's particularly attractive now that NVDIMM is a thing, since your disk cache can be non-volatile.

>>14970

It'd be simpler to just have groups of functions (i.e. programs), and a jump table for each program that you update whenever you alter a function. The hard part isn't fixing up imports, it's figuring out how to update your data structures on the fly. If you rewrite your program to use a linked list instead of a growable array, how do you cleanly manage the two data structure versions? What if you add a 'creation time' firld, or something similar that can't be back-calculated from existing data? You can handle it, just not transparently.

On a semi-related note, since 64-bit memory is so damn big I've been thinking about a microkernel design where all software/hardware is mapped to a single address space, with the MMU being used to provide security. Message passing is then just address passing, and RPC is just a matter of jumping to the right address. The NX bit of the MMU can be used to map privileges to regions of memory, so that program-local memory can only be read by the appropriate code.



File: 1458109966118.png (2.77 MB, 200x200, The C Programming Language.pdf)

No.14991 [Reply]

Last thread about programming books died so here's this one.

To start, anyone have books related to C and/or Unix programming?
235 replies omitted. Click reply to view.

  No.22766

Does anyone have Type Driven Development with Idris?

  No.22802

>>17756
i've been trying to find a good resource on assembly and the art of assembly language looks just like what i wanted. thanks m8



File: 1458547048954.png (71.6 KB, 300x169, scala.png)

No.15096 [Reply]

Any lainons here using Scala?

Reasons to use:

1. Combines functional and object oriented programming styles into one language.
2. Runs on the JVM which means you can call any Java library you want very easily.
3. Static typing catches so many errors at compile time and makes larger programs cleaner.
4. Clean and concise syntax.
5. Cluster computing. Apache Spark, which is the premier large scale data processing framework is written in Scala. Hadoop is in Java and so easy to use (see 2.).
31 replies omitted. Click reply to view.

  No.20816

>>20781

What little Scala I've done was working with a Minecraft mod (project red). There are a few that use Scala.

  No.21575

added Qmc5KR3F8mfDmgozCwRgvuk3MKxmWracpd1VWJ41gaU6bs Video/Coursera/Scala



File: 1458627734166-0.png (861.61 KB, 215x300, 1455067172551.gif)

File: 1458627734166-1.png (986.59 KB, 300x226, cybtow.gif)

No.15117 [Reply]

I figured it would be useful to have a job posting thread. Many lainchanners are keyboard cowboys and many lainchanners are working at megacorps or runing startups. It makes sense to bring those two groups together.
78 replies omitted. Click reply to view.

  No.22152

>>22119
I'm not this >>22120 lainon, but I had some thoughts too.

How do you advertise this? For instance, I have done some homework, and found severeral devs looking for work in Nigeria I have spoken with them a bit and the average price they think their work is worth is 4 dollars an hour. Now I have these guys who are qualified through the gills and I can pay them 8 dollars an hour. I can even give them a virtual space to code in via a remote server located somewhere near Africa I guess.

I can't exactly approach contract work and say " Yeah I have three nigerian programmers who can do this work, I would like to bid on your job"

erhaps I should what that other lainon suggests, and start a project pay people to finish it, and make them sign a contract that they own no part of it.

  No.22167

>>22152
Not anyone in this chain, but why can't you just frame it more like "I manage a remote team who can do this work" with location and size unspecified? I guess you can always start small until your company earns more reputation.



File: 1459115716832.png (42.72 KB, 225x300, mwl_00_1.jpg)

No.15234 [Reply]

Hi /lainons/

http://lambda.bugyo.tk/cdr/mwl/index.html

I saw this posted around here, I figured you guys might like a translation (and I need to practice my moonrunes).

It looks from the table of contents like it's a pretty basic tutorial, so you probably won't get much out of it if you're already writing crazy lisp macros. But maybe it'll be useful if you're a complete beginner just looking to be exposed to the language, and are into weeb shit ~

(Feel free to tell me my translation's shit and offer corrections)
118 replies omitted. Click reply to view.

  No.20856

>>20855

Thanks OP and great job!

A merry Christmas to you too!

  No.20857

>>20855
thank you very much, kind lainon
i wish you happy holidays!



File: 1460401037260.png (50.45 KB, 300x222, i have no idea.jpg)

No.15611 [Reply]

Alright, so, I was recently accepted into a master's degree program in the computer science field. Specifically, it focuses on cyber security. This field is quite different than what I earned my bachelor's in and it was a steep hill to climb getting to this point. I did all the pre-requisite stuff and now I'm just waiting for September 2016 to arrive. To be frank, I was a bit surprised I was accepted into this program given my lack of an engineering/science degree, and I want to be as prepared as I possibly can be. What I need is a studying regimen.

I want to learn as much C++, Python, and networking essentials as I possibly can by September 1, 2016. I don't have to be a wizard by then. Just strong enough to follow a lecture without getting totally lost. I need some advice from you guys on what's the best schedule I can create for myself.

I currently work about 40 hours a week, five days a week between 4PM and about 1AM. This gives me two days a week off, plus afternoons to myself. The way I see it, I have
>4 hours every Sunday, Monday, Wednesday, Friday
>2 hours every Saturday
>All-day Tuesday and Thursday

What's the best way to use this time if I want to learn as much as possible in 4-5 months?
21 replies omitted. Click reply to view.

  No.19664

File: 1477432538752.png (972.12 KB, 200x104, 1471150379873.jpg)

I figure I'd come back with some sort of update. I got Net+ certification on my second attempt, but I'm still struggling with finding time for coding.

Fortunately as it turns out, my master's program has been extremely light on programming so far. I think there will be some expectation that we should be able to read code, but writing it seems less essential at this stage.

At the advice of our program director, I've started studying Java. His recommendation was that learning code would eventually become a necessity in my career. I'm aiming for the Java Programmer I certification, so at least I'm on a path.

The funny thing I noticed though is that---after doing introductory studies of C++, Python, Lisp, etc.---I'm finally starting to "get it." It's almost like I had to learn the basics of a few different programming languages before I could finally start to really study one.

I "made" an ubuntu server, but I'm kind of at a loss as what to do with it now. I was wondering if I could host some kind of webcrawler on it (basically a program that archives internet content that's relevant to my coursework). Can anyone recommend some kind of relevant documentation?

  No.19677

>>19664
I wrote a scraper for a very messy website using Oga for Ruby once, that made it really easy.

>It's almost like I had to learn the basics of a few different programming languages before I could finally start to really study one.

I know what you mean, I tried a bunch of languages at first, but didn't understand much and wasn't able to write anything myself until I started reading SICP.



File: 1461130706406.png (77.91 KB, 279x300, The Heart of the CARDIAC.jpg)

No.15797 [Reply]

This is /λ/, also addressable as /lam/, the programming board.

The intended purpose of this board is technical discussions concerning programming. Discussion of activities, techniques, tools, and whatnot related to programming are also relevant.

This is not the board to recruit programmers for grand ideas.

All files posted here should have relevance to the topic at hand, such as a current project in action or to provide other information as necessary. If a program to be discussed will not fit in a post, upload it as a tarball instead.

Use code tagging to nicely render programs as such: [code]⍴⍴⍴x[∕code]

Peruse the board before making a new thread. If a thread is deemed repetitive, it may be closed with a redirection to the appropriate thread.


File: 1462328612922.png (393.84 KB, 202x300, 1449707431259.png)

No.16121 [Reply]

Do you guys suffer from perfectionism?

Is it a bad or good thing in the programming world?

Of course, a perfectionist programmer will learn much more about programming than an average, not-so-much motivated programmer. But, sometimes I think I spend too much time doing something that could be done in 1 or 2 hours. In the last university project, we had to make a simple Web application with API use. It would not take more than 2 hours to get everything done - you only had to get the json, and format it in css/html. I end up messing around with javascript, angularjs, and did look around about some design patterns for web applications. I spent my whole day on it. As I feel good spending hours in projects(since i hardly start them), I also get fucked up in the other classes that I should study.

Do you guys relate to it too?

related reading and discussions:

https://www.quora.com/Should-software-companies-avoid-perfectionist-programmers
https://mlafeldt.github.io/blog/perfectionism-and-programming/
http://programmers.stackexchange.com/questions/170731/is-perfectionism-a-newbies-friend-or-enemy
19 replies omitted. Click reply to view.

  No.20706

>>20686
I think taking time is the important part. I've found sometimes I dive in and do a bad job, and spend extra time redoing the entire thing, but this is better than procrastinating on trying to come up with how to do it perfectly the first time, which usually ends up wasting even more time.

  No.20717

>>16125
How do you learn and get better as a perfectionist in this field if you cant start writing at all when starting off? Its good as an experienced person but when starting off as >>16122 said it can really demotivate you.



File: 1463122490563.png (300.63 KB, 213x300, workshop.jpg)

No.16359 [Reply]

I'm sure you lainon have got some bash sugar to share.
Post your
> scripts
> aliases
> .bashrc, .zshrc
even if they're small or simple.
100 replies omitted. Click reply to view.

  No.22676

>>16397
The "obtuse" bit is a regular expression. Most languages support regexes, but perl is the standby language if you want to just pipe a bunch of text into one.

Perl is actually a pretty nice language, and supports tons of features. The biggest problem with perl is that it has so many features that it is often difficult to read other peoples' perl code - they know and use different perl features or styles than you.

  No.22690

>>16386
I like your search() function, but I don't like having queries in the URL. I modified your script to use POST. (As far as I can tell, elinks doesn't have an option to POST, so this script is written for w3m. It should also work with lynx.)

  #!/bin/sh
echo q=$@ | w3m https://searx.me -post -



File: 1464326618936-0.png (346.6 KB, 300x169, boardgames.jpg)

No.16718 [Reply]

there was a thread once, it had games where you program AI, an electrical engineering one, and a few others, I don't remember them all or maybe any, so I would like to start a new thread.

you program AI to fight
http://vindinium.org
21 replies omitted. Click reply to view.

  No.22675

>>22670
Yes, because learning and mastering that made up language is usually the whole point of the game.
That's not true for screeps. They expect you to learn JS somewhere else as a means to playing their game.

  No.22693

File: 1490653250377.png (431.69 KB, 200x107, 88cda5e9760100a14797b5521fa31786ba1656dc83a0f3d69149eabbdee65fbe.png)

>>22675
>That's not true for screeps. They expect you to learn JS somewhere else as a means to playing their game.
>I'm mad because the game doesn't have a tutorial
There was a time when games had instruction books and didn't hold your hand. But you probably don't remember that.



File: 1466220584294.png (2.77 MB, 300x300, cover.jpg)

No.17131 [Reply]

We definitely ought to have this thread, since AI is about as future as it gets. If you're not coding artificial intelligence, your replacement will be.

Hacker's Guide to Neutral Networks: http://karpathy.github.io/neuralnets/
37 replies omitted. Click reply to view.

  No.22825

>>22824
I'm not >>22807, but yes that's true. Neural nets for the most part tend to be nothing more than optimization programs, which when given high-dimensional data is able to, through a series of operations on matrices/tensors/vectors combined with some rather involved calculus, output a prediction on the classification of that data.

There's no way (currently) to apply semantic representation to said operations so it's difficult to understand why a model might be doing poorly or extremely well. There are some general metrics used of course, and iirc some groups are trying to turn these into less of a black box. And on the notion of expert systems, I think there was a paper recently where a group trained a series of networks on certain tasks, and then treated those networks as "expert systems" which were utilized by a higher-level network to pass data to them depending on the task at hand. In other words, it's a step towards trying to create a system which can handle multiple, distinct problems rather than a single one.

Hopefully that was clear, I'm still learning these things myself.


Unrelated but is anyone doing research in the field here? I need connections + advice and my university is lagging behind when it comes to this ;_;

  No.22826

>>22824
yeah but there are some ways of figuring out how they make those connections, by looking at what inputs cause certain neurons to fire. There's some neat programs that do this for you but I forget their names now.



File: 1466463564972.png (41.2 KB, 300x231, elixir.jpg)

No.17169 [Reply]

How the hell is nobody talking about this great language here on >>>/λ/ ?

Resources:
http://it-ebooks.info/search/?q=elixir&type=title
44 replies omitted. Click reply to view.

  No.20021

>>17172
>python looking
How? It doesn't look at all like python.

For context, I'm pro-python anti-elixir, not the other way around.

  No.21600

There is a really short book/videos set called "Take off with Elixir":
https://bigmachine.io/products/take-off-with-elixir/
The guy is charging $40 for it which is way too much. If anyone can find a download link or has this and can upload it to a download site I appreciate it



File: 1467222432201.png (867.91 KB, 300x296, album.png)

No.17326 [Reply]


Brain wants to improve the performance of the Brainfuck programming language and extend it as well, as Brainfuck itself has a lack of data types and does not perform great control over variables, as well as when you want to make libraries and/or functions and when you want to use different models other than characters and small integers.

One of the main ideas of Brain is saving some operations in machine language, creating an instruction optmizer due to the excess of instructions that Brainfuck would generate. Brain aims to implement it by using current technology (LLVM).

In spite of implementing new commands and features, Brain tries to be completely compatible with Brainfuck.

https://github.com/luizperes/brain
8 replies omitted. Click reply to view.

  No.20509

>>17330
Some people think you should only use computers for practical things. And yet have a bunch of games installed; go figure

  No.20512

File: 1480299569065.png (181.79 KB, 161x200, catgirl-approves.jpg)

>command \> increments a data pointer, moving it right, while < decrements it, moving it left
>command + increments value at data pointer, - decrements
>\. outputs value, \, accepts value

Dang, this is actually pretty dank. It looks like something I might want to program in just to mess around. I guess not all esolangs are Malbolge, huh?



File: 1468687055913.png (420.13 KB, 300x207, Screen-Shot-2014-05-20-at-4.51.48-PM-640x440.png)

No.17463 [Reply]

Lainons, how do I get into Reverse Engineering? Best book suggestion?
What kind of CS background do I need?
I know some assembly and C. The drive behind this all is that I want to get more into Assembly, figuring out what does what is fun.
50 replies omitted. Click reply to view.

  No.21402

>>21383
or learn both at the same time, http://gcc.godbolt.org/ is especially nice for it.

  No.21405

>>21402
I didn't know of this. Thanks!



File: 1469343711898.png (70.77 KB, 299x300, 1467780022399.jpg)

No.17540 [Reply]

Hey λainons, anyone else taking the Programming Languages by Dan Grossman MOOC? It's a second or third year course, so it's more meaty than most programming moocs and you'll probably learn something from it if you're self taught.

I've heard a lot of good things when it was offered some years ago, but sadly it didn't stay open like most moocs do. Anyways, it's a 3 part course that seems like the "survey of X civilization" in college, if you've taken one of those. It uses SML(static functional), Racket(dynamic functional), and Ruby(dynanamic OO), but It's more about the ideas of the paradigms rather than the languages themselves.

Either way, it's free, so if you're unsure just check out the intro video to see if it's something you'd like.
https://www.coursera.org/learn/programming-languages
31 replies omitted. Click reply to view.

  No.18792

this has been a really interesting two weeks so far. though the pace feels a lot faster than part A, the material feels meatier and a result I'm definitely feeling like I have less time than before. I'll admit I was having trouble getting my head around the parentheses but I'm getting a feel for things now and DrRacket is excellent.

  No.21737

File: 1485937545069.png (15.95 KB, 169x185, dan.jpg)

>>17734
It is SML (Standard ML) and it is the main language that the course is in.

>>17734
> Regardless, it looks like the language has what are called implicit returns.
It does, the moment is sees that it doesn't lead to another expression it will return.

>>17823
Most functional languages have a form of pattern matching. Haskell and Elm being prime example of this.

>>17824
>The second set of homework questions has made me feel like an idiot all over again. I have no idea if nested patterns is the right way to solve the first few, supposedly basic, problems, but I'm lost for any other way.
Homework in this course is really difficult and incredibly rewarding. Especially the second homework of part B will completely destroy you.

>>18116
He chose those languages for a particular reason. He explains them in the course but it boils down to the fact that they all showcase different ways of programming. He didn't think that Haskell was so radically different to alter the course so he didn't (he does recommend it for learning lazyness). Personally, I agree with this choice since SML is much simpler than Haskell.

>>18124
They come out whenever the last part is finished so you you can keep on learning.

>>18274
>I hope it's as enlightening as part A, but I guess since most of the "mind=blown" stuff was already covered it'll be a little less crazy.
I'm doing part C currently after taking a break and it is blowing my mind all over again. It is crazy.

>>18792
>this has been a really interesting two weeks so far. though the pace feels a lot faster than part A, the material feels meatier and a result I'm definitely feeling like I have less time than before. I'll admit I was having trouble getting my head around the parentheses but I'm getting a feel for things now and DrRacket is excellent.
>>18792
>this has been a really interesting two weeks so far. though the pace feels a lot faster than part A, the material feels meatier and a result I'm definitely feeling like I have less time than before. I'll admit I was having trouble getting my head around the parentheses but I'm getting a feel for things now and DrRacket is excellent.



File: 1469627286925.png (46.17 KB, 300x300, plt_scheme_lisp_logo_steal-your-face.png)

No.17588 [Reply]

Hey fellow lainons, let us a talk a bit about Racket in particular.

I am pretty surprised that this tasty Scheme flavor isn't more popular:

- Actively maintained by skilled people
- Goes well with SICP & the 'Schemer' series (has #lang's for both)
- Because of that it is a nice Lisp to satisfy our scientific lambda urges
- Nice DSL properties, even used by Naughty Dog because of that
- Nice Documentation
- Pretty useful (in a practical sense) standard library

It seems to me like this language is unable to shake off its "Teaching Language"
reputation.

What do you think about Racket?
123 replies omitted. Click reply to view.

  No.22415

File: 1488853183530.png (42.98 KB, 168x200, drunk1.jpg)

>>22411
Sounds good, but memory usage was the only thing that really bothered me. It wasn't possible to keep multiple services running on a cheapo cloud box. Do you want to post sauce?

  No.22421




File: 1469842224589.png (1 MB, 230x300, conventional.png)

No.17659 [Reply]

This is the Beginner's General for beginner's 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.
298 replies omitted. Click reply to view.

  No.21067

>>21066
Sorry about that it was due to the use of the <>. Please remove them from the links. Apologies

  No.21069

File: 1482518550459.png (285.01 KB, 141x200, 1468971566437.jpg)

>>21067
now they work thank you very much good sir have a cute girl for your efforts



File: 1469995802346.png (861.61 KB, 215x300, 1458627734166-0-λ.gif)

No.17682 [Reply]

Python 3 thread. What are you working on ?
89 replies omitted. Click reply to view.

  No.22741


  No.22749

>>22741
I like this idea a lot. Girlfriend and I were actually thinking of doing something similar. Keep up the good work.



File: 1470004377488.png (72.3 KB, 300x300, __tobiichi_origami_date_a_live_and_pixiv_drawn_by_mugen_ouka__b468b755e5d0e3c32f7908cfb3db29ed.png)

No.17686 [Reply]

When writing software, there is always a trade-off to be made between a solution that does just what you want now, and a more general solution that might be useful in the future. This is typically resolved by invoking YAGNI: You Aren't Gonna Need It. Although sometimes You ARE Gonna Need It and picking the special-case solution will come back to bite you. One of the hallmarks of a great programmer is being able to recognised when the increased up-front complexity of the general solution will pay off in the long run.

We take a different attitude when introducing external dependencies. It seems that we're much more tolerant of pulling in an external dependency which does a lot more than we need. This is usual justified by pointing out the advantage of not needing to develop, test, and maintain some code in house. The typical invocation here is Don't Reinvent The Wheel.

But where is the line? At what point does the more general external solution become so complex that apparently duplicating the necessary functionality internally is a better idea?

I have been thinking about this recently, due to some difficulties we have been having with a couple of libraries at work. Each implements some behaviour we need, and each has its own performance failings. This weekend I decided to experiment by implementing JUST what we needed and nothing more, and by restricting myself like that I could take advantage of the specific use-case and produce a library which is much more performant.
8 replies omitted. Click reply to view.

  No.20659

>>17686

I think minimizing dependencies is often a good exercise unless you're using an incredibly trusted library - libev or protobuf for instance. But in the more general

>go with something that works now vs optimal behemoth


Upgrading the old working software with more experience and bug knowledge is just easier and makes you look like a badass at work. So don't reinvent the wheel on your first try, but down the road you can find some pretty neat solutions.

  No.20671

>>20658
Or a lot of libraries, it feels really messy when a project has a bunch of dependencies.
Dependencies themselves are usually a problem which sometimes arise from behind the useful work of package managers, but also make the program deviate from standards more and more and it makes it less simple as well, as >>20597 points out, it's a soykaffest of features most of the times.
Other times it's that the libraries themselves are some sort of behemoth, for example webkitgtk.
Vim+lua+python+ruby is another example of library blowup, thankfully they are optional.
It's not that I'm against libraries. If a project uses curses, or SDL, or even gtk (a GUI library, I don't like GUIs), I don't care, they are standard enough. But sometimes I get a bunch of dependencies for really obscure libraries which I never know what they do, and those libraries are only required by this one program, and it means only work (I have to get out of my way) to find out what they do and if they don't have some nasty vulnerability that the developers (it being a rather obscure library) haven't fixed.
Nope, I don't feel at all comfortable around library abuse.



File: 1470288503450.png (87.25 KB, 300x191, core.jpg)

No.17763 [Reply]

Anyone going to DEFCON? I wouldn't mind running into to some Lainons if you don't mind giving up some of that Lainonymyninyninynity.

I assume most of you will be participating in the core war tourney.

Hope to see some Lains at the con.
3 replies omitted. Click reply to view.

  No.19953


  No.19960

>>19953
Just because it's fun doesn't mean it's a good idea



File: 1469917534276.png (872.67 KB, 169x300, 1467258491623-1-art.png)

No.17785 [Reply]

Coding poetry.

I was thinking about that: can one write a poem/short-story using the syntax of it's favorite programming language? Have you tried ?
19 replies omitted. Click reply to view.

  No.22827

>>22814
Judging by the whole Being Nothing Becoming thing, its related to the Hegelian Dialectic.

  No.22828

Found this link worthy of sharing
http://sourcecodepoetry.com/



File: 1470795031590.png (12.92 KB, 300x127, erl.png)

No.17864 [Reply]

Who Erlang/OTP here?
9 replies omitted. Click reply to view.

  No.20969

>>20964
Nah, the erlang otp1.png is just the same image in lower quality that I found first

  No.21037

>>17864
Tried out Elixir with Phoenix earlier this year. I really like Erlang's message parsing.



File: 1470890092139.png (54.67 KB, 300x217, praxis.png)

No.17892 [Reply]

Does anyone here use praxis?

github.com/createuniverses/praxis

Do you like live coding? If so, do you prefer to make your own environment, or use an existing one? If you make your own, do you prefer to use an off the shelf embeddable language like Lua or s7 scheme, or do you implement your own language?

This seems like a good board. Thank you for your time.
40 replies omitted. Click reply to view.

  No.18930

>>18911
Try the other folders.

cauldron
syntaxXXXX
flashbackXXXX

  No.19326

>>17892
it built fine but errors out with this when trying to run:


Hello from the input thread.

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 53
Current serial number in output stream: 54



File: 1471212063969.png (650.94 KB, 211x300, 1452715120528.png)

No.17964 [Reply]

I'm trying to learn Coq without much success. I've attempted reading Software Foundations and some tutorials, but I always end up stuck on theorems. The problem is, I have absolutely no idea why am I stuck, what could I do about it, and how did I end up there. To be honest I just throw tactics around without any plan hoping I will solve it by accident.

It seems very alien to programming. How should I go about learning it?
6 replies omitted. Click reply to view.

  No.20858

Read Coq'Art.

  No.20859

>>18159
In the following code, Trans proves that x :: y :: l and y :: x :: l proves the predicate.
Trsucc is an inductive predicate, it supposes you can prove transpose l l, and then proves that x :: l and x :: l' proves the predicate. It basically like induction in math (or simple recurrence).

Inductive transpose (A : Type) : list A -> list A -> Prop :=
| Trans: forall (x y : A) (l : list A), transpose A (cons x (cons y l)) (cons y (cons x l))
| Trsucc: forall (x : A) (l l' : list A), transpose A l l' -> transpose A (cons x l) (cons x l').



File: 1471547763745.png (6.7 MB, 200x200, Graph Theory.pdf)

No.18037 [Reply]

I know we've got a couple matheads up in here.

This thread is for discussing math, theoretical CS, crypto, and other mathemagical fun stuff.

Post books, papers, and blogs.

I've been working through this textbook, the first chapter is a really good intro to graph theory and how to reason about them IMO.
162 replies omitted. Click reply to view.

  No.21410

>>21395
UK and I wasn't aware of that, thanks for the tip friend.

  No.21418

File: 1484441301282.png (928.86 KB, 200x200, Lecture Notes on Graph Theory - Keijo Ruohonen - 2013.pdf)

Does anyone have any good resources on multi-path routing?

I have a decent understanding of graph theory and basic routing algorithms, but I'd like to expand specifically into multi-path for post-graduate research.



File: 1471637670861.png (927.68 KB, 300x188, serial-experiments-lain-reelgood.jpg)

No.18076 [Reply]

Hey lainons
I hopped onto the mumble server last night and jawed for a while with kalyx and some of the other admins, he seems like a pretty cool guy who doesn't afraid of anything

With all these changes to the board vichan is kinda fucking him over when it comes to moving the threads, some of them just aren't moving, which illuminates an important issue

This site's backend is absolute garbage

Which doesn't make a whole lot of sense when you think about it, we've got a programming board populated by a lot of really smart people, so knock off the soykaf and pitch in, you can do this.

I've cloned the lainchan repos already and I'm trying to learn php, I'm a really inexperienced programmer and I know nothing about web development, but this place is probably the best on the internet right now and I'll be damned if I won't support it somehow (because lord knows I don't have the money)

Stay awesome lambda, and I hope we see some more pull requests rolling in

>pic related is my reaction to the board software, it's bad, like really bad
206 replies omitted. Click reply to view.

  No.22349

>>22345
When are these meetings by the way, can I get a schedule? I'd like to attend if it's just on the mumble server or something.

  No.22358




File: 1472595429900.png (276.38 KB, 224x300, jigsaw.jpg)

No.18314 [Reply]

This is the APL thread. The intent is that APL programs, literature, techniques, and general musings may be shared here.
Here is a link to the APL standard document; it is actually a gzipped PDF: https://www.math.uwaterloo.ca/~ljdickey/apl-rep/docs/is13751.pdf

Here are questions to encourage discussion:
Which implementation do you prefer?
Do you prefer standard APL or a different dialect?
What first drew you to APL?
What do you consider to be the strengths and weaknesses of APL?
What is your APL environment?
What programs written in APL do you use?
Is APL your main language?
15 replies omitted. Click reply to view.

  No.20463

>>19294
>>Why use J when you can use K
Because J has a single complete open-source implementation. Installing 3rd-party libraries is easy.

K is a moving target, and there are many different, incompatible implementations. The official implementation of K4 costs $$$. The official implementation of K5 is available only if you have a login at kparc.com

To me, K's biggest advanage is that its syntax/grammar is MUCH simpler than J's.

  No.20486

>>20455
you can obtain an unregistered version of Dyalog with a popup ad though you can register a non-commercial (or student) license with them easily enough too.

also worth checking out Mastering Dyalog APL available for free from their website.

http://dyalog.com/uploads/documents/MasteringDyalogAPL.pdf



File: 1472603147867.png (535.48 KB, 300x240, 1470853985458.jpg)

No.18319 [Reply]

i've been looking for some updated, recent, reliable resources that would offer an organized courseload for someone who was pursuing an online degree.

i don't know if any lains who are great programmers wouldn't mind trying to make a lain-list for computer science, in particular for a lain university.

https://github.com/open-source-society/computer-science

i found this comp-sci degree list where they organized all of the courses and resources in a fashion that seemed logical and helpful. any lains that wouldn't mind suggesting any actual courses that are relevant to it, perhaps i can try to make a master list for the wiki?
29 replies omitted. Click reply to view.

  No.19552

>>19521
>>19551
Likewise, you can use a NAND gate to make an AND gate by just inverting the output.

Also, remember the Boolean Algebra definition of XOR is:

XOR = (~A * B) + (A * ~B)

Now that you can use a NAND gate to make OR gates and AND gates, you can use those concepts to make an XOR gate.

Oh, and if you need to make a NOT gate, just hook both inputs to the same source. If the input is high, it'll come out as low, if the input is low, it'll come out as high.

Hope this helps, friend.

  No.19566

>>19531
He probably already owned a copy



File: 1473129847028.png (25.69 KB, 300x225, carpe.jpg)

No.18463 [Reply]

Do any of you work remotely? Either from freelancing, providing a service or actually being hired by a company remotely.

Tell us a little about your experience, how did you get to where you are now and on what area you work on (security, front end, back end etc).
13 replies omitted. Click reply to view.

  No.22273

>>22254
You just need to show what tools would be useful for remote work. Are you a developer? If so, conference calls and Slack cover all of the communication you need. DVCS (like git, or hg) is very remote-worker friendly.

I work 100% remote and find that I end up communicating with my coworkers better than when I was in an office.

  No.22791

>>18497
Same. I usually work from home when I have a project I need to focus on, without getting distracted by people in the office.

Fapping becomes like a coffee break though.
Reply to a few emails, fap. Write new ACL for firewall, fap. Have conference call, fap. Buy the time I realised what I was doing I'd fapped three times and it was only 11am.



File: 1473192273433.png (1.24 MB, 300x116, Space-cadet.jpg)

No.18486 [Reply]

This is the Lisp General, ask any and all Lisp questions here. Below is a link to the general's texts which contain many links to various books, documentation, websites, and other interesting information.


>Check the texts first:

https://lainchan.org/~lisp/


>Read the FAQ:

https://lainchan.org/~lisp/faq.txt

>To foster discussion:

Which dialect do you prefer?
Do you use Emacs or a different lisp-based editor?
What was your first experience with lisp?
What have you made in lisp?
What is your favorite Lisp program?
What do you like about Lisp?
How do you think Lisp is (one of) the superior programming language(s)?
How long have you been programming in Lisp?
What are your favorite Lisp resources? Please share, preferably links!
Is Lisp your main programming language or not? Regardless, what do you primarily use it for?
What would you like to see in the Lisp general?
What was your favorite aspect of the Lisp machines?
Do you think we'll ever get something similar to the LispMs again?
What is your preferred method of documenting your code?
In the dialects that allow it, do you make many reader macros or not?
Do you use more than one dialect? What are they and which do you prefer?
What do you consider the criteria for what constitutes a Lisp to be?
What is your favorite function in your chosen dialect(s)?

Challenge:
Write some utility functions or other enhancements that would be useful in other programs.
298 replies omitted. Click reply to view.

  No.21094

>>21093
you can reasonably expect (lambda (arguments...) (code...)) and (if cond branch1 branch2) to work the same in any lisp dialect. Besides that, no.

  No.21095

>>21093
>I have a question - is there a standard that every lisp dialects share ? More than just the syntax. What has been standardized to work with every dialects ?
Disregarding all not Emacs, Scheme, and Common, this is still hard to say.

Many arithmetic and list functions, such as + and map, are present and named the same, but may behave slightly differently. Common Lisp's multiple return values are a big difference with many operations.

Even car and cdr behave differently. Common Lisp's car and cdr accept NIL, as an example.

There's still if, but even PROGN is begin with Scheme.

Scoping is generally the same, but not with Emacs Lisp. Many predicates and destructive operations have parallels, but follow different naming schemes.

Common Lisp has arbitrary length integers, Emacs Lisp doesn't.

So, only the most basic operations are shared and even then may behave differently. I would write this is why it's considered a family more than basic variations on a theme.

By the by, this thread is now full. I'll make the next later. Have a Merry Christmas and all of that.



File: 1473452544526.png (192.28 KB, 300x169, maxresdefault.jpg)

No.18575 [Reply]

A friend wants to start making games but I really don't know what I should say. Like which language and framework to use ? He is ready to learn and I can help him with the language but I haven't got into game dev yet.
35 replies omitted. Click reply to view.

  No.19666

>>19603
You could use mruby as scripting language.

  No.19668

>>19603
Long time since I posted here but I wanted to add some input on this. I really like ruby and Im building a game on rails with it. It really depends on the game you want to build. Im doing a 2d strategy so the ability to work with a database and put it on the net faster is what im looking for and rails is a great package for getting what I want done fast. Every language is a tool and not all problems are nails.



File: 1474220453419.png (397.44 KB, 300x223, 1327272753031.png)

No.18797 [Reply]

Would anyone be willing to update the gentooman's library? It's a great resource but a lot of the books are outdated by 3 or 4 editions. Even 5 sometimes.

I have a fuarrrkton of books but it's not realistic to do a project like that alone. If there is interest we could start a new version of it.
24 replies omitted. Click reply to view.

  No.21714

>>21712
Sturgeon's Law.

  No.21715

>>18797

I kinda like this Idea, I downloaded a copy of the library a while ago. It would be nice to have a wiki sorta thing that provided a brief description of the content in each book, maybe that way you could search in the library for keywords like 'language design'.



File: 1475436250268-0.png (68.05 KB, 300x211, tux-Java-t2.gif)

No.19026 [Reply]

I don't know much about Java so I'd like to know a bit more about it.
Is it a memory-efficient language?
Does it have analogs? Widespread analogs?
Is it used in embedded solutions?
28 replies omitted. Click reply to view.

  No.20363

>>20362
>>19026
JVM is C the classes et al are java interpreted through java virtual machine.
learn memory management. learn C POSIX.
check the standard.

Documentation
C std: https://volafile.io/r/kUFzLJ (C.tar.gz)
open std: http://www.open-std.org/
gotta love std's

  No.20364

File: 1479898587123.png (383.77 KB, 142x200, 1456385755307.png)

if your on windies learn the windows api download linux distros BSD, system V, ubuntu.

Xploits:
setup ubuntu with encrypted drive.
restart cpu when your asked for the password dont enter it.
instead hold enter for 70 seconds or press enter 93 times pop you get a busybox shell. now fix the bug with the patch CVE.

this will give you an idea of codeflow restriction and lack there of. suitable users dorks only



File: 1476044390445.png (3.17 KB, 300x150, Oekaki.png)

No.19205 [Reply]

I'm in college right now. Nothing fancy, I'm not rich nor smart so I didn't get into any good schools. In fact I'm in community college right now, working on an associates degree (2 years, then transfer to another college and be in the junior grade immediately). I'm satisfied since 1. this helps keeps costs very low since I can be at home & 2. I do horribly in new living environments.
Another college is building a four year school here in my town. From what I've heard, the director of the CS department is very passionate and excited to be able to lead the program, since he thinks most college CS programs are outdated. They offer a mobile applications (applied program that earns you 12 or so credits on top of your regular CS degree) course.

>"With the applied computer science option, web and mobile software development, you will develop the multi-disciplinary skillset required to solve these and many other problems as you take courses in algorithm development, machine learning and data analysis, database design, web and mobile application development, UX design, and entrepreneurship. This program will provide you with a solid foundation in computer science and prepare you to join one of the fastest moving and exciting areas of technology."


At first I thought it was kind of gimmicky, but now I'm thinking differently. Mobile development isn't going to stop. As much as I find smartphones distasteful from a privacy standpoint, it's going to be the biggest personal computing market soon. Getting some experience with it is going to definitely not hurt my chances of having my resume not thrown in the trash.

Does your college have a good, relevant, modern CS program? I won't ask where you go 'cause OPSEC, but knowing if you go to an Ivy League or similar private schools would be good as well. Anyone doing it all/mostly online?
8 replies omitted. Click reply to view.

  No.20285

>>20279
save your earnings and invest conservatively as in the dividend aristocrats...depending on what you make, you can probably achieve a livable dividend return in a few years time. once you learn to live on your dividends, go back to school while remembering to get as much grant and scholarship aid as possible.

get your degree and enjoy your new life.

you could also talk to your employer about a work study program and tuition reimbursement, most technology employers worth their salt will offer such features in the interest of good pr and improving their human assets.

best wishes and thanks for the lain.

  No.20286




File: 1476377865907.png (113.33 KB, 276x300, 1399278987466572432.jpg)

No.19298 [Reply]

I know this doesn't belong here, but it doesn't belong anywhere. I had no idea where the fuarrrk to post it, but I figured it's kind of a "programmer's problem" so what the hell.

Do any of you lains have RSI? What do you do for it? Does anything besides Oxycontin® help?
10 replies omitted. Click reply to view.

  No.19745

Have anyone here used any kind of vertical mouse? I got my kind of RSI from holding mouse, I think i got it at times when I browsed lots stuff without knowing how to use keyboard shortcuts. Now it hurts just from using mouse a bit. I tried using trackball that i had stashed at home but it's making work harder, I think it was meant for graphics development and not coding.

  No.20766

I was beginning to get RSI in one hand and Carpal Tunnel in the other, from working on a supermarket checkout all day and then internets all night, but I staved it off with Alexander technique, deep tissue massage, and hot and cold soaks.



File: 1476436120235.png (728.19 KB, 291x300, 1468834760936.png)

No.19331 [Reply]

What are the best learning resources you have ever consumed, lain? Courses, college classes, projects, books, exercises, anything goes.

For me it's:
>CS50
It's an insanely good introduction to compsci, helped me understand how things work and have a little more confidence in my ability as a programmer.

>SICP (MIT course and book)

As important as CS50, but focused on programming and complexity by itself, i imagine most of you have read it already. Both the course and the book are equally high quality and give you a depth in your knowledge as big as CS50 does. Also without the course i probably would have dropped SICP for thinking it's too hard for me.

As i'm a beginner my list is pretty small, though. I can't think of anything that has helped me in a unique, significant way besides those two.
11 replies omitted. Click reply to view.

  No.22748

>CS50
It's ok. Better than Code Academy.

Pluralsight courses by big names are usually really good. I took the C# and Python paths. Unfortunately there isn't really a whole lot about functional languages outside of maybe JS because of the site's focus on workplace domain education, but there are a bunch of FP courses on the site as well as a DS&A course. College students get 3 months free, but it's $30 + change/month. I think it's worth it but I am also no longer a college student aka having realistic income. You can get live mentorship for the price, so you don't miss out as much on the asking questions part, but I haven't used it so I have no idea if it's even worth it.

  No.22750

I did nand2tetris (also known as "The Elements of Computing Systems") [1] in high school. I learned as much from is as I learned in my my first two and a half years as a CS major (except for learning Scheme/Racket first semester). I highly recommend it to anybody who has basic mastery of any programming language. The necessary software is Java based (and therefore cross-platform) and free, the first half of the book is free, and the whole book can be purchased for $30.

For people who do not yet know how to program, I recommend "Invent your Own Computer Games with Python" [2]. I like it because it is strongly result-oriented while still teaching lots of principles, and because it is available as a paper book or electronically on the website. Each chapter covers a simple computer game. The chapter opens with a description of how the game works. Then, you are presented with the entire source code of the program. You are supposed to type the code yourself (like BASIC / asm listings in home computing magazines of yore). After the listing, the a few common errors are described, along with where to look for the mis-typed line. If you mistyped a program and can't figure out what you did wrong, the website has a diff utility that will compare your code to the book's and show you the differences - including where the bug is.

At this point in the chapter, you have a working, playable computer game, and you have at least a passing familiarity with the code that makes it work. The rest of the chapter covers small pieces of the code from the game - pieces that use operations or concepts that the previous games haven't. The chapter explains the concepts in more detail, and gives several examples to play with.

I already had a firm grasp of Java when I read "Invent with Python", but I learned Python very quickly and painlessly with it, and recommend it to everyone who asks me what they should do to get into programming.

[1] http://nand2tetris.org/
[2] http://inventwithpython.com/chapters/



File: 1476539677095.png (125.36 KB, 300x105, application-binary-interface.png)

No.19368 [Reply]

How does one create freestanding programs?

Given the complexity of today's software, I think it is refreshing to go back to basics. Using only a given processor instruction set and OS system call interface combination, how far would it be able to go? If a program does not link to any library, not even the C standard library, how would it work?
20 replies omitted. Click reply to view.

  No.19653

File: 1477423536113.png (299.04 KB, 200x150, picture_11.png)

>>19372
>>19384

there is already a thread for this idea

https://lainchan.org/%CE%BB/res/12467.html

  No.19734

>>19653
For all that vague talk, there's way too little actual code.



File: 1476569564453-0.png (45.66 KB, 200x200, 6884283.png)

No.19383 [Reply]

Anyone proficient with Prolog?
What can it be used for?
What is the best source to learn it?
34 replies omitted. Click reply to view.

  No.22039

>>22038
I would do that while checking the type of Cmds. If the head of the Cmds is a Dec, you typecheck it, then add the name+type pair to the envorinment, and check the tail using the new environment.

Something like this:
typeCmds(env, [var(Name, Type)|Cmds], void) :-
typeDec(env, var(Name, Type), void),
typeCmds([(Name, Type) | env], Cmds, void).

It's been a while since I last used prolog and I'm not sure if I understood your problem but I hope it somehow helps you!

  No.22049

>>22039
Oh god, this is so simple I feel very dumb now. I really should have been able to figure that out on my own.
Well, thanks for the help Lain!



File: 1476701764092.png (38.18 KB, 300x296, 1469415224986.png)

No.19446 [Reply]

What personal projects have you done lately, /lam/?
93 replies omitted. Click reply to view.

  No.22779

I've been working on my own python program for making employee schedules. It uses a local optimization algorithm. The problem is, I don't know how to put the data into a nice grid format. Do I need to learn GUIs or can I somehow export the data into a spreadsheet?

  No.22781

>>22779
Just use comma-separated values? Excel/calc/etc read that as a spreadsheet. This is the typical way to store code intended to be used as a spreadsheet.



File: 1476745594389.png (225.77 KB, 256x300, 1450286163448-2-tech.png)

No.19458 [Reply]

Anyone else working on an imageboard or textboard engine? I remember that we had a thread like this in the past. What are you working on, what languages are you using, what are your goals?

I'm currently updating futallaby as a fun little project. So far I've made it html5 compliant, added cap codes, image replies and bans, made styles switchable, and I probably did some more that I've forgotten. It's been pretty fun so far.
32 replies omitted. Click reply to view.

  No.20243

>>20241
the only way to learn programming is actually doing it. everyone's first projects are complete soykaf, it's just a part of the learning process. I'd say go for it

  No.20536

https://github.com/bakape/meguca
what are your opinions lains?



File: 1476851207763.png (37.72 KB, 229x300, wtfamicasting.jpeg)

No.19498 [Reply]

I have a pretty good experience with programming in C and have put significant work into a few non-trivial projects, but my knowledge of networking leaves much to be desired. I've taken a networking course and done simple toy programs like a port scanner and a simple client-server messenger, but I'm not really sure how to progress to an intermediate and eventually expert level. I want to become a networking wizard.

Any tips, or suggestions on what I could build to gain some real practical experience with the full TCP-IP stack and maybe learn how and why to use raw sockets etc.?
15 replies omitted. Click reply to view.

  No.20033

File: 1478503363570.png (38.23 KB, 200x153, howtopose.jpg)

>>20032
>1. Can you talk in general what kind of non-trivial C projects you've done?
I would be a little too close to doxing myself if I did that, but it's related to secure communications.

>2. Why Google? Try SearX or ixquick

I'll check both those out.

>3. Any new cool projects you made out of this like that redirector you've mentioned?

I've just been playing around with DNS spoofing the past few days, trying different things and learning about how DNS works. I tried to spoof the DNS request rather than the response (i.e. I drop the target's request, spoof my own request with the same ID, then let the response through to the target), but that doesn't work. I guess the client has to verify that the original request query name matches the query name in the response. My new working method has me doing a single initial DNS request for the "trap" domain, storing the result, and then replacing DNS responses to the target with my stored result while leaving the target's query intact.

I haven't decided what my next project will be yet. I'm thinking maybe a router like >>19920 suggested. I'm also beginning to learn how to use tcpdump alongside/instead of wireshark.

>4. Still going at it with TCPIP illustrated? How beneficial and practical is it

I'm finding it invaluable as a protocol reference, which is exactly what I needed. I've been reading through RFC's as well, but those can be pretty verbose.

  No.20674

>>20033
Join a darknet like anonet or dn42 that requires you to use BGP instead of just read about it. Then get the rest of your network to use that computer as a darknet router and get routing and DNS be transparent for the rest of your LAN into the darknet.



File: 1477025531819.png (99.06 KB, 300x200, 3000px-Chi_uc_lc.svg.png)

No.19540 [Reply]

This is the thread to discuss the various manner of encoding characters, character information systems, and other means that we generally use to represent text and related information.

This is the thread to debate the positives and the negatives of each such system and their various platforms of use.
15 replies omitted. Click reply to view.

  No.19633

>What do you wish language designers paid attention to?
>#1 answer
>Unicode support

http://softwareengineering.stackexchange.com/a/33639

  No.19641

>>19600
>The purpose of text encoding is to encode characters.
And then to be able to read those characters back. Because networks exist, characters might be encoded on one machine and decoded on another. It seems foolish to say that interoperability isn't the purpose of text encoding. Interoperability is the purpose of all data formats.



File: 1477125883451.png (7.08 KB, 128x128, R (7).gif)

No.19567 [Reply]

Hello, /lam/. I have previous programming experience, i worked 1 year as a junior dev and did 3 years of college, however both were soykaf and my foundational knowledge is like kicking dead whales down the beach. I have until April (roughly 6 months) until money runs out and i have to find another job, my intention to fill the gaps in my knowledge before that. Keep in mind the market is irrelevant, i can easily get a (soykaf) job already if i need the money, so studying something like node.js just to get a gig would be a waste of (precious) time.

Last month i did "CS50" (an online course), read "C primer plus", "how to build your own lisp", "learn C the hard way" (don't), and "21st century C". Right now i'm doing MIT'S "Structure and interpretation of computer programs" course, i tried reading SICP alongside the course but it felt rushed, the books is complex enough by itself, so i left it alone until i finish the course, right after finishng the course i will focus on finishing the book and all exercises.

What would you recommend me next? Also, i know practical projects are important, but remember that i already have a few years of practical experience, i want to use these 6 months to get raw knowledge, after that i will definitely spend my time doing projects, but if i do that now i'll end up having to work again, that means no time to study.

Right now i'm loosely following the OSS curriculum (https://github.com/open-source-society/computer-science), however some courses suck and i swap them for something better, for example i swapped "program design" for MIT'S SICP. Besides that i'm reading some books, after SICP i have these in my queue:
"Code complete", "Introduction to algorithms(gang of 4)", and "Clean code". What other books, courses and general resources would you recommend me, considering my intentions mentioned above?

TL;DR: I have 6 months before Lucifer takes over my body, my only chance of survival lies in filling the gaps in my computer science knowledge, recommend me stuff.
17 replies omitted. Click reply to view.

  No.22040

>>22035
No problem! Glad to be of help!

  No.22041

>>19591
why do you say gang of four should be avoided? just wondering



File: 1477374770885.png (82.31 KB, 300x225, NeverEnough.jpeg)

No.19635 [Reply]

Why isn't GPGPU bigger? Is it just a lack of a good API / Native language support? I'd love to see a fully featured c-like language that isn't an API or requires hundreds of lines of boilerplate.
3 replies omitted. Click reply to view.

  No.19640

GPUs are good at doing the same thing with huge amounts of parallelism. They're not so good at branching, which turns out to be fairly important.

  No.19727

>>19638
Bitcoin mining rig



File: 1477448187296.png (129.64 KB, 300x146, cobol.png)

No.19676 [Reply]

Apparently if you master COBOL you can get very high paying government jobs super easily. Many of the older systems they can't afford to update are built on it, and everyone who knew COBOL is starting to reach retirement age.

Has anyone tried learning this? How awful is it really?
38 replies omitted. Click reply to view.

  No.21111

For those of you that can read german, the new iX special edition coming out is all about legacy program(ing), it includes a tutorial on Cobol:

https://www.heise.de/developer/meldung/Legacy-Projekte-iX-Developer-Altlasten-im-Griff-ab-sofort-am-Kiosk-3504405.html

  No.21223

>>21053
>This is a COBOL implementation of MMSEG which a Chinese word splitting alcobolrithm.
Did they just run s/go/cobol/ on the whole thing?



File: 1477699458489.png (80.15 KB, 300x300, logo-v2.png)

No.19760 [Reply]

Anyone here interested in or learning Rust? This language looks like it will finally be the one language to put C++ away for good. It gives very low level control over memory, more so than C++ even while using very high level Ocaml-like abstractions. So far no big project has been made with Rust so there is still speculation as to what its capable of. Ive read a couple of books (there are only a couple out) and gone through the official tutorial and while much of it is easy to understand I still lack an overall grasp of this language. Have you guys tried this language yet?
46 replies omitted. Click reply to view.

  No.22633

I'm working on a medium-to-large-sized project using Rust. Not a big fan of it but it's thousand times better than C++. Just thinking about C++'s retarded syntax and working with STL and libboost makes me cringe.

  No.22650

>>21523
I'm not a fan of Rust, especially due to its community, but it's a fairly new language. I think time will cure the lack of projects and I hope that one day it will improve and it'll actually be worth learning.



File: 1478192113515.png (10.82 KB, 300x125, d.jpg)

No.19910 [Reply]

Been awhile since apple introduced hypervisor.framework and we have several solutions for virtualization on os x :

1. vmware

do they use hypervisor.framework? Ugh I'll never know

2. virtual box

open source...but bit too many kernel extensions imo

3. veertu

https://github.com/veertuinc/vdhh

GPL licensed, tailored for running windows and linux VMs

4. xhyve

https://github.com/mist64/xhyve

ported from bhyve of freebsd. BSD licensed and supports linux and freebsd VMs atm.


What do lainons think of virtualization for OS X?

Any of you have small side project using the framework?

For me, as most of my gears run openbsd beside this MacBook and I want to run one inside it, I tried adding openbsd support for xhyve but xhyve's design decision for booting is way too ad-hoc for other OS.

So I began fiddling with openbsd's vmm, porting it to OS X just for booting openbsd VM. Most of hard works of reimplementing openbsd vmm apis using hypervisor.framework's apis are almost done and I'll try to release working build within month.

  No.19914

not exactly hypervisor but there's dos emulator using framework written by developer of xhyve too.

https://github.com/mist64/hvdos

with some good introductory article

http://www.pagetable.com/?p=764



File: 1478235925682.png (1.9 MB, 300x213, tumblr_njmt9tmlzJ1tysz53o1_500.gif)

No.19925 [Reply]

Hi lains,
I have a strange idea that I'd really like to pursue but I need some helping fleshing it out.

The story begins with the README for some AI-centered programming language, developed by a professor at a prestigious research university, apparently cut short for some unexplained reason. However, a very straightforward tutorial is included alongside a working compiler.
The reader is strongly urged to try the tutorial, closely following the code examples. However, when you run the code yourself, it's ouput doesn't exactly match that of the tutorial...
At one point, you try the code
for i in 1..5
print "i = " i
But instead of getting
i = 1
i = 2
...
you get
i = 1
i = 2
i = 3
ca
i = 4 n you
i = 5 hear me?
Something in the compiler itself is trying to talk to you... and as you progress the tutorial, you learn a way to talk back
6 replies omitted. Click reply to view.

  No.19949

Well, if this is in a game, you'd be better off with an interpreter, and the virtual machine is what talks to you.

  No.22817

What progress have you made with this? Have you developed the concept further?



File: 1478367882151.png (46.56 KB, 265x300, 1477703956647.gif)

No.19978 [Reply]

Why is lisp and related languages so popular on this chan? I am currently learning C++ and wonder why I barely see any languages such as that on here. Is there something that is missing out in modern languages that lisp has? Is Lisp a must know language?

  No.19979

>Why is lisp and related languages so popular on this chan?
An active Lisp group was migrated here. You can find it here: >>18486
>I am currently learning C++ and wonder why I barely see any languages such as that on here.
There is a C++ thread here: >>11025
>Is there something that is missing out in modern languages that lisp has?
Lisp has homoiconicity, one representation for a program and data, which easily allows for programs that modify programs. This enables powerful metaprogramming.
>Is Lisp a must know language?
No language qualifies as that. I doubt it will hurt you, however.

Now, this question isn't appropriate for its own thread, considering that there already exists Lisp threads and whatnot, so this is being locked now.



File: 1492025656234-0.png (856.23 KB, 300x225, img_3662.jpg)

No.2 [Reply]

This is the Beginner's General for beginner's 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.
74 replies omitted. Click reply to view.

  No.706

>>585
Okay I changed the line to :
celsius = (5.0/2.0) * (fahr-32.0);
the program compiles but when ran it only shows a pair of very long numbers.
There is probably something I'm not taking into account.

  No.711

>>706
go line by line through your program line by line and ask why that line is there and find the answer. why include stdio.h? what does float mean? how does it compare to int? what is a while loop and why do you use it? what is printf and where does it come from? what do you want your program to output? what is it outputting? why do you think the error is with the line that you think its on.

you seem to be guessing on how to fix the program, stop doing that. once you understand the problem you can form a solution.



File: 1478515251293-0.png (58.31 KB, 200x300, conspiracy.jpg)

File: 1478515251293-1.png (20.99 KB, 300x255, uwotm8.jpg)

No.20034 [Reply]

Hey lainons, long time lurker here.

While I truly enjoyed discussing random crazy ideas in most of /tech and /lam, it came to my attention that some lainons don't really understand how unix work both abstraction wise and implementation wise.

Which is nothing wrong, considering most newer devs are more experienced in web development framework or high level languages providing strong abstractions, hiding most machine specific stuffs and unix wizardy.

And even some oldfarts might be lisp hacker who does not give much soyfak about io side effects and let the system programmers do the dirty works (and do it correctly).

And yet, most of us works on unix variant os and it never hurts to take a look at tools at your disposal, as it leads to insights about things you can build with it, inherent limitation and whatnot.

Even if you are not toolsmith kind of person, how hardwares work and how unix abstracts those devices are never ending source of inspiration (believe me, some people worked on one project longer than some young lainons' lifetime and they refuse to get tired of hacking one)

So without further ado, I introduce this (meta?)thread, dealing with inner workings of unix operating system.

Instead of calling someone newfag b4 they finish design and implementation of freebsd operating system and POSIX specification, I propose the magic trick that works for me all the time : read and write (code or documentation about) actual program.

Now creating one's own unix variant is lifeconsumingly interesting project, but as a programmers we are obliged to optimize our learning process whenever it makes sense to & serve the purpose.

Instead, I'm thinking of posting general abstraction layer's design and provide pointers to real operating system's implementations (source code) with explanation of why is it written that ways (what FILTHY hardware design imposed on the implementation and those kind of reason)

I can explain how openbsd(i386, amd64, arm, sh4) and linux (limited part of it...) is implemented in details as I was part of developers (still contributes random bug fixes, but with much less frequency), so my implementation example would be mainly from those two projects. Other lainon can help me out if they can provide counterparts for other os.

If this thread gets traction, maybe we can start lain magazine series too.

any suggestions and ideas?
what should we start? I was thinking about file system in general (from file to vnode and how hard drive controller works).

tl;dr
ever-evolving state of art design and implementation of operating system (3rd edition)'s unix subset without spoon feeding.

more like general os internal wiki, but it's hard to teach|learn something soley from wiki if you cannot explain what you don't know.
34 replies omitted. Click reply to view.

  No.20251

How would i go about creating a thumbnail video player, /lam/? For example, i have a porn folder with WEBMs and gifs, but if i were to sort through them i'd have to open them in VLC, find what i'm looking for, copy the name, search for the name in thunar and only then have my file.

I know there are alternatives to this, but i'm looking for a personal fun project, however i don't know how to approach this problem.

TL;DR
Instead of image thumbnail, a video thumbnail for webm files in linux.

  No.20772

Bumping a good thread.

>>20251
This is not the thread to ask, this is about unix internals. If you want video thumbnails is your file search GUI (in this case, Thunar), you'd have to either:
* see if the program is configurable via a scripting language and if it is scoped to do what you want
* dive into the internals of the program, find the code that displays the thumbnails, extend it to do just what you want.
The beginner's general is better for this kind of question.
Have fun



File: 1478664921513.png (67 KB, 300x188, 4u.jpg)

No.20062 [Reply]

Hey lain, recently a group friends and I decided that we would try to make some shitty program, but we found it difficult always having to copy and share the source code amongst each other. Is there any real time, group text editor that would allow all of us to be working on the samething, remotely, at the same time, preferably some type of web application?
7 replies omitted. Click reply to view.

  No.20086

codeshare.io

  No.20134

>>20072
>>20062
I've used floobits before with 5 people in hackathons. It doesn't do that well at handling 5 people at time. It can be a bit easier to deal with if you make sure only two people are in the same file at a time.

Floobits should be okay for 3 people though.



File: 1478674832546.png (7.09 KB, 300x120, fern1c.png)

No.20067 [Reply]

Core War is a game played between two or more programs written in Redcode, a low-level language similar to assembly. Players write a program to eliminate all opponents in the memory of the MARS virtual computer. Core War can also be used as a platform to experiment with genetic programming.

*warriors of lainon

*mars implementations by lainon

*strategy

*experience, memories, nostalgia

general info:

http://corewar.co.uk

mars implementation examples :

http://www.koth.org/pmars/

http://corewar.co.uk/simulators.htm

def con 24 hosts corewar event :

http://silverwingedseraph.net/def-con-24-0x20th-anniversary-core-war-competition

https://forum.defcon.org/forum/defcon/dc24-official-unofficial-parties-social-gatherings-events-contests/dc24-official-and-unofficial-contests/0x20th-anniversary-core-war-the-ultimate-programming-game/223170-information-about-corewars-at-def-con-24
2 replies omitted. Click reply to view.

  No.20703

I have a warrior to show off. I've found it's able to defeat or tie most types of warriors, owing to its combination of a parallel core-clear and a small fast paper.

;redcode-94
;name nanopaper
;strategy: tiny paper with core clear
;author king_radical
;assert CORESIZE == 8000

paper_offset equ 597

org start
clear_target1: dat 2000, -2000
clear_target2: dat 150, -100
clear_target3: dat 3000, -3000
clear_target4: dat 1000, -1000

start: spl spawn
clear: spl 1
spl 1
spl 1
spl 1
mov clear_target1, <clear_target1
mov clear_target1, }clear_target1
mov clear_target2, <clear_target2
mov clear_target2, }clear_target2
mov clear_target3, <clear_target3
mov clear_target3, }clear_target3
mov clear_target4, <clear_target4
mov clear_target4, }clear_target4
jmp clear

spawn: spl 2
spl 1

paper: spl paper_offset, #paper
mov.i >paper, }paper
jmp paper, <paper

pretty good for a novice, IMO.

  No.20908

https://www.youtube.com/watch?v=1Qz83ZmpFf0

Found something that looked cute. I like the sound synth.



File: 1478919130369.png (141.78 KB, 191x300, not_this_time.jpg)

No.20125 [Reply]

Christoph Hellwig's case against VMware dismissed

https://lwn.net/Articles/696764/

Oracle v. Google

https://www.eff.org/cases/oracle-v-google

Hopefully both cases will be appealed soon and there's no guarantee that these two cases will be enough rulings to be applicable in all the future cases but it just got me thinking :

If APIs are not copyrightable, or if it they are copyrightable but we acknowledge the "fair use" instances,

what prevents for profit organization from writing proprietary software that provides API/ABI compatibility with GNU/Linux like wine and ReactOS?

what's going to happen when hardware companies refuse to provide any more information to linux dev (not even bothering with NDA contract option) and only support said proprietary os?

this thread might belong to /tech or /lamb, but potential implication is more about expanding the concept of copyright as understood by juristic system so I'm posting it here.

  No.20132

>what prevents for profit organization from writing proprietary software that provides API/ABI compatibility with GNU/Linux like wine and ReactOS?

Nothing. It'a an even easier endeavor since Linux is fully open source. The question is why would anyone want to do that? Clearly nobody has a good enough reason to spend developer time doing this.

>what's going to happen when hardware companies refuse to provide any more information to linux dev (not even bothering with NDA contract option) and only support said proprietary os?


They're going to support a crappy alternative OS nobody cares about and people will flock to their competitors. Meanwhile Linux devs will just reverse-engineer their hardware and get it to work if it really is that important.



File: 1479057688875.png (59.89 KB, 300x300, 1478014675036-b.jpg)

No.20141 [Reply]

Hi all!

I found that learning all alone might be unfunny sometimes. I want to find some people who might be interested in a learning group. The goal is to learn programming languages, electronics and everything members want. Also I'd love to work on collaborative projects.

We can think on which program we will use to talk.
30 replies omitted. Click reply to view.

  No.20210

>>20149

Joined both IRC and gitlab

  No.20214

>>20210
Cool !



File: 1479135934826.png (137.16 KB, 300x300, 1445012740714.png)

No.20172 [Reply]

Hello guys. I hope I'm posting this in the correct board.
You people have introduced me to a lot of different alternative services for my every day needs, so I need to ask:
Do any of you guys know a free and private Subversion hosting service? I've been using different file hosting services to store my source code but i think i can get more out of a svn server. Or is it a best option to set up a server for myself?

Pic unrelated, obviously.

  No.20193

gitla.in

  No.20200

>>20172

In general see
https://en.wikipedia.org/wiki/Comparison_of_source_code_hosting_facilities

For SVN or subversion specifically

Options include:
* Self hosting
* https://riouxsvn.com/ (4*50MB size limit)
* https://deveo.com/ (currently free, but may not be forever 1GB of total storage)
* http://mysvn.ru/ (50MB size limitation)
* https://www.springloops.io/ (100MB size limitation)

Please note, you asked for subversion hosting, so the answers above are for free private subversion hosting, not git hosting or mercurial hosting.



File: 1479498896460.png (185.1 KB, 189x300, tmp_26099-nse003_008116422427.jpg)

No.20268 [Reply]

So I stumbled upon a manga called SE and was surprised by how far they went with their knowledge of software engineering, particularly since its an ecchi manga.

Do you guys know any other non-textbook works that treat computer science related works?
Aside from the "The manga guide to..." series of course.

Source for SE:

http://mangafox.me/manga/se/
11 replies omitted. Click reply to view.

  No.20667

>>20519
animebytes.tv

  No.20669

>>20269
SE is too lewd for me.



File: 1479510473481.png (4.79 KB, 155x160, download.jpg)

No.20276 [Reply]

Z80 or 6502?

And no copping out by saying you prefer the 6809. Everyone prefers the 6809.
17 replies omitted. Click reply to view.

  No.22635

So i'm starting to try and build my own system with a z80, and i'm a bit confused on starting it. I have some sram that i plan to use for hte memory, but i want to be able to use an eeprom to load programs onto the machine. I'm going to make my own assembler/programmer with a uc but i don't know how to go about boot loading. Should i have it start reading from the eeprom then hand the address bus to the memory after? should i try to get everything copied to memory? I'm not sure what to do or how to do it, a lot of this hardware level stuff is unfamiliar to me. I'm trying to understand the pinout of the z80 right now and what each pin is used for (I know the obvious ones like address and data pins)

  No.22658

>>20276
z80 most fun to program

>>21650
it's a beautiful mess; have fun implementing an optimised multiplication alg ^_^



File: 1479637700314.png (4.49 KB, 282x179, images.png)

No.20305 [Reply]

is there a default network protocol lib in linux with templates
cant find in the man pages except cat /etc/protocols.

  No.20317

#include <netinet/in.h>
#include <sys/socket.h>



File: 1479916968633.png (26.53 KB, 300x218, images.duckduckgo.com.png)

No.20366 [Reply]

The firm I work at has decided that I am to teach a course. Mainly I am supposed to teach some guys how to access a database using SQL and R. (I know, I know, SQL is not programming, but I hope you get my point).

I am a self taught programmer. So I tried to replicate my learning experience: This is, once you get a problem to work solve, read the documentation until I figure out a way. Since its a course, I thought I would give them little pices of information about SQL, and then give them a problem they can solve with that pice of information. Then start building up their knowledge by increasing the problems they need to solve, until I finally introduce them into the real work their are going to have to execute.

First thing I did was show them some regular expressions, and made the participants match 8 digits using \d (just type \d 8 times). They just could not do it, I did not even see them try. Obviosly, I gave up in my aproach about let them work out the stuff, and just spoonfed them all the info I wanted them to get out for the session.

How do you guys teach programming to other people? Mainly, how do you engage them to make them think about the problem? Do you approach the transfer of information in a different way?

Maybe I am to caught up in the socratic method of teaching: I wanted them to discuss the problems, while I led this discussion towards a solution. Maybe there is a better way to do it. Any opinions on this?
7 replies omitted. Click reply to view.

  No.20520

Assuming the course is meant to be simple and informal (no heavy relational DB theory or statistics involved), consider following along the W3C tutorial: http://www.w3schools.com/sql/default.asp

Unfortunately, it probably is the case that these people don't care too much about learning and they're just there because they have to. A self-teaching approach only works when the individual is motivated, curious and critical. It's very disheartening, but if your audience can't ultimately be made to care about the topic, straight up telling them the essentials of what they have to do might be all you can do. Especially since you're not an experienced teacher, so it can't be expected that you can pull of some incredible stunts of pedagogy.

But if you're feeling adventurous, an approach you might want to use (dunno how much time you have available though) is to start by trying and teaching them programming without actually writing code, to get into the right mindset.
Programming is ultimately about putting together a plan to solve a problem. Present them with an intuitive, real life scenario with a set of very basic tools to solve it: cooking might work well, recipes are basically code already. Take an onion, peel, rinse, cut it; heat oil in a pan, sauté UNTIL brown (you've got a loop already). Many cakes require preparing custard for filling: like most cooking books do, show how to make it once, then wrap it in functional abstraction and call CUSTARD(eggs, milk, sugar) whenever its needed afterwards. Hell, advanced recipes even require multitasking.

You do this drawing a flowchart at the whiteboard from their input a few times, then start replacing onions with integers.

Regardless of the fluff you put around them, flowchart-based applications are often used to introduce children to programming because they give a visual representation of what you'd otherwise put in code, which is usually less intuitive.

Godspeed, lain.

  No.20904

https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1
Read the first section of this, the part before 1.1.1. I think this is the best way to teach, explaining the structure of the language. Regex is small so this shouldn't be hard. You should first explain the primitives (a matches a, . matches a single character, \d matches digits, etc.), then the ways to combine them (concatenation, repetition, etc.), and abstractions (groupings).



File: 1480050278609.png (66.48 KB, 300x129, wG51k7v.png)

No.20415 [Reply]

Use whatever brace style you prefer.

But not this.

Don't do this.

Seek help instead of this.
49 replies omitted. Click reply to view.

  No.21078

>>20415
I just threw up in my mouth a little.

  No.21083

>>20783

The first example there doesn't look like Allman style, it looks like gnu style (or man-I-wish-I-was-writing-lisp-instead-of-C style).

Does anyone know of any non-gnu projects that use gnu style?



File: 1480290807568.png (140.61 KB, 300x300, animegirlreadscode.jpg)

No.20505 [Reply]

Do people actually read code? Do you?

I frequently see people recommending others to read programs, especially well written programs, but I never hear anyone say that they've just read this great piece of software, come check it out.

So I guess the question is, do people read others' code? If yes, is it actually useful? What are some good code to read? If no, why do they recommend doing it? Why are they not doing it? Is it useless, is it too hard?
23 replies omitted. Click reply to view.

  No.20768

>>20765
>not writing all your notes as hex dumps
do you even hax?

  No.20774

>>20650
GNU started at MIT where Lisp was prevalent at the time, their coding style stems from that. That's why it looks so shockingly different from other source posted.



File: 1480420432125.png (12.56 KB, 300x121, ElmLogo.png)

No.20555 [Reply]

Just tried Elm out. I have to say I'm really impressed and it changed my view on how useful functional programming actually is for GUI programming.

It basically made me realize that Haskell is bad at GUI's because of a lack of good libraries, not because of the paradigm used. Elm is also statically typed functional, but it is really good for GUI's because the language, the standard library, and the basic tutorials were all built specifically for that task from the beginning.

Having made a few basic browser apps, I'm leaning towards the opinion that pure functional might actually be the very best paradigm for GUI's, better than anything procedural or OOP, as long as you follow a good structured approach similar to the MVC pattern. But then again I'm still in "new toy" mode so my opinion might change over time.
10 replies omitted. Click reply to view.

  No.20611

Elm is a nice project, I use it every time I need to write more complex frontend code and I always enjoy it.
I do believe it sorely lacks something similar to type classes or ML-style modules, but I'm pretty sure they'll be added at some point, the author just doesn't know how to make them simple and easy to use yet. Much of the focus right now is going into making it easy for beginners, the small size of the language and the lack of such more advanced features are a result of that.
There actually are functions that operate on "generic" types (number, comparable etc), but for the moment they're strictly compiler magic.

  No.20651

>>20610
Haskell is basically *defined* by the presence of higher order typeclasses and lazy evaluation, neither of which Elm has.
You could also probably say that OCaml is defined by its module system and record objects.
Perhaps we can both agree that Elm is just a typed functional programming language without some of the more "mathematical" features of more popular FP languages... but perhaps it doesn't need them...

Pro-tip for language designers: don't skimp out on abstractions (e.g. Go\generics, Elm\typeclasses).



File: 1480631549461.png (2.37 KB, 226x138, aoc.png)

No.20599 [Reply]

It's back, it's better than ever, and you can join the fun at http://adventofcode.com/. Are you in?

Feel free to share your answers here (or on the subreddit, like everyone else on the internet).

For the uninitiated, the Advent of Code is an annual programming challenge designed and Eric Wastl, the man behind The Synacor Challenge (among other things). It's fun, and if you suck (like me) and don't know your algorithms, you'll likely learn a lot.
16 replies omitted. Click reply to view.

  No.20934

>>20925
i did it that way because i'm suing netbeans and also because i'm doing each day in its own file, then calling it in main. I'm too lazy to open up cygwin, make, and run it myself on my craptop

  No.21263

>>20934
>i'm suing netbeans
On what grounds?



File: 1480759725150.png (246.72 KB, 300x225, Iwakura.Lain.full.769791.jpg)

No.20633 [Reply]

Hey λ
I'm kinda stuck, I just turned twenty and I decided to take a look back at the progress I've made over the last year as a programmer
The answer unfortunately is not that much, I understand a ton of languages at a basic level but I never get much further than that, I don't really get into the details of a language because once the novelty wears off I can't stick with it.

I was diagnosed with ADD as a kid, I don't medicate for it, and as a result of that I can't sit down and concentrate for a lengthy period of time unless I'm really interested in or passionate about something. It makes slogging through the more difficult portions of a programming textbook incredibly frustrating, because try as I might once I lose interest I don't retain any information from what I'm reading.

I know attention issues are common among the enthusiast community so I'd like to know how you guys deal with it.

I can "program" the same way a kid can build a house out of legos, but I struggle to become competent with a language before I lose focus

I've had flings with almost a dozen languages, but I still don't feel comfortable calling myself a programmer, because I really couldn't do anything useful in any of them.

I mean finding a really interesting text or tutorial would help, but what I really need is a more effective strategy for cultivating and maintaining my attention, often enough to become a decent programmer, I just feel so stuck
9 replies omitted. Click reply to view.

  No.20676

Lainon here with a similar problem. Should I just try getting stimmed

  No.20679

>>20676
Yes. At least try it. Works for me



File: 1481492536885.png (102.43 KB, 300x300, bite_the_pillow_im_going_in_dry.jpg)

No.20736 [Reply]

Anybody here ever use the verification tool ProVerif, and can explain the difference between a destructor and an equation to me?

  No.20755

This is not appropriate for a new thread; use the Beginner's General: >>17659



File: 1481497429410.png (3.45 KB, 273x184, s.png)

No.20739 [Reply]

Anyone here using Julia in place of R or Matlab? A lot of data mining people use Python instead of R as R is very confined to just doing matrices (tables), Python offers more ease of use for general purpose tasks.. But now we have Julia which is blazing fast, has matrix and math operations built into the core. Has great low level support so you dont have to switch to C. And most of all it has very psuedocode-like syntax similar to Python/Ruby. The fact that its non-OO will also free it up from having code blocked inside class/object namespaces. I think this language has a lot of potential for backend web programming for something like the way js is used in node.


File: 1481776418809.png (56.25 KB, 261x243, camelia-logo.png)

No.20794 [Reply]

I was thinking about picking up a scripting language, and after trying out Python and Ruby, realized that I never considered Pearl as an alternative.

What is lainchans opinion on Perl 6? It seems to receive a lot of hate, I can't say much about it myself, except that Perl code looks foreign to me upon first look.
13 replies omitted. Click reply to view.

  No.20836

>>20828

> unicode operators

It seems to me as well as if they are an entirely optional feature. Its just that the Perl6 creators appear to be pretty proud/happy about them (Im not judging).

  No.20878

>>20826
I fuarrrking hate Racket. The batteries are nice, but the stdlib is trying to implement, like, 8 paradigms at once: it makes CL look uncluttered.

Chicken's my go-to Lisp at the moment, it being essentially the polar opposite of Racket, but still having good libraries.

I wouldn't reccomend either for scripting, though. My scripting languages of choice would have to be AWK and Ruby. Or maybe JS.

Another promising candidate for scripting (although I haven't had time to evaluate it yet) is TXR (http://www.nongnu.org/txr/), which seems to be what happens when a Lisp hacker looks at AWK and Perl and thinks "I can do better than that." So it not only has the standard regex support, but also its own recursive pattern matching language, which is a lot cleaner, and does a good job parsing complex structures.

And if you really hate lisp, TXR can also emit the bindings from the pattern match as a collection of POSIX shell variable bindings to be `eval`ed.



File: 1481810918607.png (65.07 KB, 300x105, code_quality.png)

No.20802 [Reply]

I've been programming c for a couple years very slowly and lately have gotten into it much more.
As a challenge i wrote a program to convert Decimal into Binary Equivalent as something like that wasn't in any libraries i could find.
What do you guys think of my code? And general critique thread.
#include <stdio.h>
#include <math.h>

int findGreater(int input){

int power = 0;

while(input >= pow(2,power)){

power++;

}

power--;
return power;

}

int main(){

int dec, greatest = 0;

printf("Value to convert: ");
scanf("%d", &dec);

if(dec < 0){

printf("Incorrect Value Type.\n");
return 1;

}

greatest = findGreater(dec) + 2;
char binary[greatest];

int size = sizeof(binary)/sizeof(char);

for(int index = 0; index <= greatest; index++){

binary[index] = '0';

}

binary[greatest - 1] = '\0';

while(dec != 0){

greatest = findGreater(dec);
binary[size - (greatest + 2)] = '1';
dec -= pow(2,greatest);

}

printf("Binary: %s\n", binary);

}
49 replies omitted. Click reply to view.

  No.22452

>>22448
Found the issue:

apparently binary operators need to be 'friend' non-member functions.

  No.22476

>>22448
>defining functions in a structure
wat the fug, c++



File: 1482180630826.png (1.45 MB, 300x182, inline_html_enabled.png)

No.20936 [Reply]

  No.20937

I'm not aware of what this is. This almost appears to be advertising of a sort.

Regardless, starting a thread with a single link isn't allowed. Try again with a better opening post, if you're so inclined.



File: 1482183115760.png (471.57 KB, 300x300, programming-8239.jpg)

No.20939 [Reply]

Hi /λ/.

I've been programming for about one year now but never managed to master a language. Two months ago, I set the goal to master Python.
After making Codeademy course, reading Learn Python The Hard Way and other books and making some exercises I got to the point where I know the language, but I do not master it.
If I needed to make a simple script, I would make it in minutes but if needed, I couldn't make a big project.
What can I do to master it?

TL;DR: need some tips mastering a programming language
28 replies omitted. Click reply to view.

  No.21022

>>21019
Don't worry.
Use Common Lisp.
C++ is gross and no one actually knows it.

  No.21024

>>21019

Maybe I'm weird, but I don't find C++11 and above all that boring. I mostly program in Scheme, C, and Perl, but I don't mind dropping into C++ when I have to. I like the RAII concept and the functional features they've added.

Granted, I only learned C++ a couple years ago and only focused on the new style and features, so that might have something to do with it. Windows C++ code makes me recoil in horror.

Still, I'll take it over Java any day.



File: 1482289353880.png (75.07 KB, 268x300, MIT-supercollider-book.jpg)

No.20989 [Reply]

any λ lainon here programs music with SuperCollider or any other programming language such as alda or ChucK?

how you doin? was it to hard at first? i'm looking forward to finishing the vimtutor so i can use it on SuperCollider Mode, it's the first time i'm inclined to use vim for anything

general music programming discussion is also allowed i guess, i'm trying to learn as much as possible
19 replies omitted. Click reply to view.

  No.21711

>>21275
SC isn't based on a Smalltalk environment per se. It's just that the object system is inspired by it.
The language has a C-like syntax but it's still pretty weird.

>>21476
>I just use C/C++ to write my music dsp code. I should really make my own audio programming language someday. Maybe when I learn more about compilers.
You don't need a compiler, just an interpreter would do the trick (unless you want to implement a JIT compiler for fun, but that would be needlessly complicated)
Basically, what you would do is to have an interpreter as a frontend that can call some compiled DSP code, written in C/C++, or Rust if it can be fast enough.
You don't even need to create a new programming language, you could do something like pyo which call C code from Python.
Or conversely, you could create a language that interacts with the scsynth server, kinda like overtone or hsc3, or something that already takes care of the low-level stuff.

  No.21735

>>21665
Try moving to /usr/local/bin



File: 1482338339954.png (55.05 KB, 300x166, ISSonLive_20160527_063040.jpg)

No.20994 [Reply]

Here we talk about reducing the dependency of JS on our websites.

For example, by replacing JS animationd with CSS animations.
22 replies omitted. Click reply to view.

  No.21632

>>21625
>but the real problem is how too often websites favor form over function.

oh shut up. The point of a website is to convey information, and like it or not information is better conveyed in pretty formats. Form = function.

  No.21640

>>21632

The point of a website has long been what ever that website wants that point to be.

>>"oh shut up"

Uh-huh right.

If you think a little past your own a e s t h e t i c bubble, you'll realize what the web has become. The most platform independent way to communicate applications using a mostly unified UI api (HTML5/CSS).

>>21625 has a point. If you look at any benchmarks regarding keyframe css animations over lets say programmatic Javascript, it introduces latencies and performance issues. You've completely missed the forest for the trees with what this lain has said. It's not that "oh the pretty lights" should be stomped out of the web experience. It's the way we're going about it. We're contriving new ways to remove something that is perfectly suited to the experience. And even if we use the most performant option it's taking its toll in performance.

Personally I believe that it isn't inherently the technology that bloat, but rather, as is usually the culprit, inexperienced programmers that aren't keeping an eye on the UX. Some pretty horrific things are being done with JS (and CSS) in terms of performance. Very few webdevs will properly tune their website to be peformant across the average UX case. Pick and choose: either the webdev is too lazy to test their site across several browsers and platforms, or their is a distinct lack of education in this testing process to begin with.

I believe that it's a mixture of the two, but mostly the latter. Any casual glance at most of these code academy like tutorials or videos gloss over the bare necessities unless you specifically search for keywords like "performant JS", or "UI/UX tutorials". Which is probably why there are specific degrees and specific job titles pertaining to the UI/UX in particular.

This same effect happens in the realm of concurrency. Most desktop programmers (where concurrency/threads are available) fail to test the peformance of their software. And when they do attempt to add concurrency they run into problems such as using the proper conventions such as contexts, locks, semaphores, non-blocking I/O, polling, etc.

I'd say a more accurate description of things is Form = UI(function)

If we're thinking about closures.



File: 1482342654009.png (89.59 KB, 300x300, 1447048898244-1.png)

No.20996 [Reply]

There's a visible text editor thread - it's at reply limit, or this would be there. Still, So, here seems like a decent place to ask:

I detest out-the-box Emacs, for visceral alt-key-related reasons. I adore vi for probably pretty standard vi-user reasons. That pretty obviously means I use Vim for practically all my text editing (including typing out this post, as it happens). Recently though, I've started noticing Vim's shortcomings more and more - mostly the soykafty syntax highlighting and the all-around nightmare that is VimScript. Switching to Emacs+Evil seems a possible solution, but:

- Can I realistically remap or disable all the escape-meta-alt-shift sequences to save myself a rage stroke?
- It's pretty widely understood that Emacs users leave the editor open for hours at a time. I'm far happier with the vi style of opening the editor only long enough to make the changes I immediately have in mind, then exiting back the the shell. Is that something I'd have to relearn to make Emacs worthwhile?
37 replies omitted. Click reply to view.

  No.21141

>>21011
Why make another when this might as well serve as the next thread?

  No.21150

>>21140

Bad idea. You don't want to infringe on EDLIN's trademark.



File: 1482364043918-0.png (284.91 KB, 300x300, gerwinski-gnu-head.png)

File: 1482364043918-1.png (89.59 KB, 300x300, Vimlogo.png)

File: 1482364043918-2.png (65.92 KB, 300x87, neovim-logo.png)

No.21010 [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?

Can your editor be customized? If so, how have you customized yours?

What all do you use your editor for?

Do you use more than one editor regularly? If so, why?
114 replies omitted. Click reply to view.

  No.22838

>>22783
ssh is super easy on emacs with tramp. I don't have to leave my current emacs session to edit files over ssh. Just find-file "/ssh:<ssh host name from ~/.ssh/config>". Nothing wrong with sshing and running the machine's vi/vim though.

  No.22840

I've used the following editors in this order:
-Notepad++
-Netbeans
-Atom.io
-VI
-GVIM
-IntelliJ

I was a VI fanboy for the longest but I got to admit, IntelliJ wipes the floor with all editors. There's not even a close 2nd to IntelliJ in my opinion.



File: 1482561702094.png (865.28 KB, 212x300, patches.png)

No.21073 [Reply]

This is the Beginner's General for beginner's 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.
222 replies omitted. Click reply to view.

  No.22834

>>22830
  >>> import traceback
>>> def add (a, b):
... print ("--- [ stack inside add {} {} ]---".format (a, b))
... traceback.print_stack ()
... return a if b == 0 else add (a + 1, b - 1)
...
>>> add (10, 4)
--- [ stack inside add 10 4 ]---
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in add
--- [ stack inside add 11 3 ]---
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in add
File "<stdin>", line 3, in add
--- [ stack inside add 12 2 ]---
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in add
File "<stdin>", line 4, in add
File "<stdin>", line 3, in add
--- [ stack inside add 13 1 ]---
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in add
File "<stdin>", line 4, in add
File "<stdin>", line 4, in add
File "<stdin>", line 3, in add
--- [ stack inside add 14 0 ]---
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in add
File "<stdin>", line 4, in add
File "<stdin>", line 4, in add
File "<stdin>", line 4, in add
File "<stdin>", line 3, in add
14
>>>

  No.22842

File: 1491615560853.png (27.81 KB, 200x200, 1320478140982.png)

I decided to learn C as my first language and it has been a struggle. I had to look up a book I liked but my biggest issue are the little things, fox example I made an if statement and in the same line wrote a ; making he statement useless and I struggled for a long while to make the program work. Other programs I make compile successfully but crash at start later the exercises grew too complicated for me and I'm not sure why, plus I also have to deal with stuff like windows closing the program when is done so I don't get to see the program running.
I'm unsure if the problem is me, C or the environment I'm working in.



File: 1482722504797.png (35.27 KB, 300x225, cartridge_handic_forth_c64_01.jpg)

No.21102 [Reply]

So many people like Forth in this site, yet there is no Forth general.
Let's talk about Forth!
Share code, ask questions, talk about Forth

What do you like about Forth?
What dialect are you using?
What implementation do you use?
What have to made in Forth?
51 replies omitted. Click reply to view.

  No.22475

having a lot of fun with durexforth under vice

i highly recommend it to anyone wanting to learn forth

  No.22491

>>22475
Why would you want to use a Forth in an emulator?



File: 1482755886319.png (313.97 KB, 300x238, 1468269825441.jpg)

No.21115 [Reply]

Hey Lainons,
I was wondering which games you would consider to be suitable for applying the classic genetic algorithm w/o falling into the mainstream choices (i.e., avoiding Flappy Bird and Asteroids).

I was also thinking about instead of using JS , I could take advantage of the fact that Golang supports pointers, allowing to work directly on the addresses of memory used by the game.

What would you suggest?
16 replies omitted. Click reply to view.

  No.21992

make a game where you earn tokens by killing really fuarrrking hard monsters and have to navigate a maze to get to the final boss an the RNG is in a casino where you can bet tokens to get upgrades and buffs present day present time HAHAHAHahahahah

  No.21995

>>21989
>Someone suggests you play a collection of games
>You ask if they recommend the games they just suggested
>thesaurus.com lists recommend and suggest as synonyms

You gonna need some higher initiative, friendo.



File: 1482784080142.png (1.24 MB, 300x116, Space-cadet.jpg)

No.21131 [Reply]

This is the Lisp General, ask any and all Lisp questions here. Below is a link to the general's texts which contain many links to various books, documentation, websites, and other interesting information.


>Check the texts first:

https://lainchan.org/~lisp/


>Read the FAQ:

https://lainchan.org/~lisp/faq.txt

>To foster discussion:

Which dialect do you prefer?
Do you use Emacs or a different lisp-based editor?
What was your first experience with lisp?
What have you made in lisp?
What is your favorite Lisp program?
What do you like about Lisp?
How do you think Lisp is (one of) the superior programming language(s)?
How long have you been programming in Lisp?
What are your favorite Lisp resources? Please share, preferably links!
Is Lisp your main programming language or not? Regardless, what do you primarily use it for?
What would you like to see in the Lisp general?
What was your favorite aspect of the Lisp machines?
Do you think we'll ever get something similar to the LispMs again?
What is your preferred method of documenting your code?
In the dialects that allow it, do you make many reader macros or not?
Do you use more than one dialect? What are they and which do you prefer?
What do you consider the criteria for what constitutes a Lisp to be?
What is your favorite function in your chosen dialect(s)?

Challenge:
As with the last thread, write some utility functions or other enhancements that would be useful in other programs.
171 replies omitted. Click reply to view.

  No.22772

>>22768
The self-application thing does make sense, thank you! I'm still very slowly pulling all these concepts together--sorry if my questions seem silly.
>unbalanced parenthesis
My bad, I'll double-check for errors in the future.

  No.22780

If you ever wanted to see any simpler examples of programs for Lisp machines, this is a good collection: http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/impdep/explorer/jwz.tgz



File: 1482976784640.png (62.35 KB, 128x128, vicinity.gif)

No.21165 [Reply]

> Have a proper data model of your system in [insert your programming language here]
> Have a properly normalized relational database schema
> Implement ORM
> Kiss your beautiful data model goodbye
10 replies omitted. Click reply to view.

  No.21239

>>21238
Like i get why we don't just return a class that's fully populated because it leads to inefficient queries but I think lazy evaluation should be able to handle that.

  No.21256

>>21219
How retarded do you have to be to write SQL injection vulnerabilities in your code in 2017?

>>21220
fite me



File: 1483375516411.png (179.91 KB, 300x216, dds-screenshot.png)

No.21232 [Reply]

The creator and lead developer of https://morph.is/v0.8/ was killed 2 days before christmas in an odd exchange with canadian police. http://www.lfpress.com/2016/12/23/london-police-one-man-dead-in-old-south-shooting-on-duchess-ave-near-edward-siu-investigating

He had stated on irc he was extremely close to finishing DDS (Distributed Discussion System) which was the irc\slack deprecation for morphis which is a distributed data storage like IPFS.

You can grab the code before it disappears by doing

git clone gitpub@162.252.242.77:morphis.git

then changing to the latest dds branch with

cd morphis/

git checkout f-dds

you'll need pycrypto and sqlalchemy to run it so

sudo pip3 install pycrypto

sudo pip3 install sqlalchemy

then while in /morphis/ do

./run.sh

and you'll launch a node

access the web ui by going to http://localhost:4251/

you can checkout Dmail (distributed and e2e email) here http://localhost:4251/.dmail/ and you can make a dmail address with the + icon in the top right corner which will let you send dmails and post in a DDS channel at http://localhost:4251/.dds/

im posting this in λ hoping some lainons will be interested in keeping the project alive as it is open source and under a GNU GPL v2 license

we'll be in #morphis on freenode
30 replies omitted. Click reply to view.

  No.22574

>>22551
heres a backup of everything https://archive.org/details/MORPHiS

  No.22577

>>22546
with chat and end to end encrypted email all with a nice ui. it was made from the ground up not to rely on any javascript and so people can make ui for a imageboard or a twitter, or a Medium



File: 1484431493905.png (84.38 KB, 300x200, webdev.jpg)

No.21411 [Reply]

Greetings fellow lainans. My apologies to the mods if this is the wrong board to ask this question or the wrong place to hold this discussion.

I am searching for reputable books on teaching the subject of Web Development. Can anybody recommend/share any books that go into depth on web development and maintaining websites?

Thank you all in advance.
4 replies omitted. Click reply to view.

  No.21417

>>21416
There are many ways you can "build great looking websites". You should have used the beginner's thread or posted this in another book thread.

Try Freecodecamp, kirupa.com, and odin project.

  No.21419

>>21417
I believe >>21413 has provided me with exactly what I need for now.

I've never heard of Freedomcamp, Kirupa, or Odin before. I will certainly be checking these out as well.



File: 1484683162842.png (3.34 KB, 224x225, inflammable.png)

No.21448 [Reply]

Hi lainanons!
I am trying to run vsyscal on 64 bit linux.
I managed to get it working on x32_86:
[bits 32]
xor eax, eax
push eax
push 0x736c2f6e
push 0x69622f2f
mov ebx, esp
push eax
mov edx, esp
push ebx
mov ecx, esp
mov al, 11
sysenter
compilation: $ nasm -f bin filename -o shellcode32.o
You will also need a C "loader" for this shellcode:

#include <stdio.h>
#include <sys/mman.h>
int main(void) {
void (*m)(void) = mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
read(0, m, 4096);
m();
}

compilation: $ gcc filename -o loader -m32
run it all:
$ ./loader < shellcode32.o

and it executes 'ls'
btw one can use call DWORD PTR gs:0x10 instead of sysenter when using glibc on x86

Now, if I try similiar thing for x64:
[bits 64]
mov rax, 60
mov rdi, 42
sysenter ;if i change this to syscall it works
compilation: $ nasm -f bin filename -o shellcode64.o
and $gcc loader.c -o loader64 -m32 (need recompile from 32 to 64)
After running
$ ./loader64 < shellcode64.o; echo $?
(; echo $? outputs return code, should be 42 [if I use syscall instead of sysenter then it is 42])
it returns with SIGSEGV
when i run it via gdb, i find that sysenter fails with "Cannot access memory at address 0xffffe090"

Is there some 1337 hacker who can help me with running sysenter on x64 system?
20 replies omitted. Click reply to view.

  No.21492

>>21491
basically, 'loader' from OP is a program that reads 4096 bytes of memory and executes it, and OP is trying to inject programs into that which do various things.

  No.21497

>>21492
Thanks, I sort of figured something like that.
I think low level stuff like assembly is really interesting, unfortunately I'm not very good at it.



File: 1485473928495-0.png (116.21 KB, 300x231, visual-basic.jpg)

No.21654 [Reply]

Is there a place for BASIC in XXI century?
It seems there's not, since this niche is already filled with Python, but some things like indentation for everything in Python harass me.

What can you say, Lain?
Do people really not need BASIC?
16 replies omitted. Click reply to view.

  No.21700

>>21691
>>21694
To be fair, Python codeguide requires to use 4 spaces as indentation.
It doesn't justify using indentation blocks as code blocks, duh.

  No.21740

Please the thread be up
bump it



File: 1485619656139.png (344.76 KB, 300x225, coleslaw.jpg)

No.21692 [Reply]

Hello lains

Does anyone here use the blogging engine Coleslaw? I'm having some issues with it but there's so little information available online. The IRC channel is empty, and from what I gather the maintainer has abandoned it, so I do not really want to email him, although I will do if it comes to it.

The first problem is that my posts are being tagged by the entire datetime string, rather than just the year and month. The second is a little more involved so I'll leave that until someone responds. Here's hoping.

Cheers!

  No.21707

>the maintainer has abandoned it
Don't use unmaintained software. If you're looking for a simple static website generator you can try Hugo, its community is quite alive.



File: 1486406277909.png (21.56 KB, 300x291, pretty_output.gif)

No.21890 [Reply]

Are there any guides or recommended readings that break down standards or outline guidelines for creating meaningful output from programs?

Striking a balance between output that can easily digested by other programs in a workflow ( piping output to another program for processing ) but keeping the output readable and meaningful to a human is a constant challenge.

There seems to be a lack of documentation on methods or ideas that pertain to finding this balance. Avoiding log files to store human readable output is ideal since that becomes a headache in itself when it comes to long running daemons.

Anyone else deal with these problems or have good documents to read?
3 replies omitted. Click reply to view.

  No.21908

>>21890

You basically have 2 options, data is in a certain order or data is not in order, but you scan through it looking for keywords in a data structure of some type. Probably dictionary.

First one is obviously faster, Second one is more user friendly

>Avoiding log files to store human readable output is ideal since that becomes a headache in itself when it comes to long running daemons.


You can have a program which converts machine readable to human readable. Or even combine log entries, if the last 100 entries have been the same, combine them, save yourself 99 lines

  No.21943

>>21896
>>21897
>>21899
>>21908
(OP here)
Interesting responses. I've always hesitated to use stderr as a way to write output to the user while preserving stdout so data can be easily digested by other *nix tools, not sure why.

Good points about not trying to constantly process text if i can better represent the data as another data structure. I'll keep this in mind when i know my output is going to another one of my own programs instead of generic unix tools.

A coworker also recommended using [] and () marks and tabbing inside my human output to help delineate between errors [!] additional info [+] the next operation [.] etc. While wrapping useful information in ().

[!] Error: Failed to find cache at (/path/to/file)

Hopefully sticking this output to stderr in all my programs would allow me to add in quiet flags and log path flags, then if all my logs are the same format i can write a log parser.

Thanks for the suggestions everyone.



File: 1486701236162.png (8.58 KB, 300x232, ide.jpg)

No.21973 [Reply]

Are they worth using on Linux, Or is command line the way to go?
What do other lains use/recommend?
31 replies omitted. Click reply to view.

  No.22837

I do mostly python/django development, with some react stuff on the front-end. I use Intellij products Pycharm and Webstorm. I'm a pretty novice programmer, but when I was learning Ruby/Rails I always just used vim.

Now that I work with Python, I find that 'code spelunking' is a really important part of my job - multiple inheritance and over-writing methods etc. Pycharm is really awesome for this. I right-click on an object and get taken to its declaration and source code. I've tried setting up exuberant ctags to mimic this behavior but have not had any luck - tags don't seem to be created from the contents of my env directory.

I fantasize about some point in the future when I am working remotely (from really remote locations) and using some kind of minimalist, low-power setup (rpi, eink monitor?) and of course going back to the terminal for doing everything. But I would really need to be able to quickly and easily crawl through source code. I don't really care about code completion.

Also, while I love Vim, I wonder if Emacs might be a better solution to this problem, as it is obvious I am pushing Vim to be more like a fully-featured IDE as opposed to just a fancy text editor. I'd probably use Emacs in vim-mode though; i do that with Pycharm.

Any advice?

  No.22841

>>22836
Either the IDE integrates with an external build system in which case your capabilities of that build system are limited to whatever is supported by the IDE. Or the IDE provides its own build system in which case other developers are forever forced to use that specific IDE. Eclipse is especially unforgivable because it uses its own compiler not javac. So projects made in eclipse might not even compile using javac.

Using an IDE also limits whatever deployment automation tools you may be using. Scripting a CLI build system is trivial compared to scripting an IDE.

Any large project will be inescapably tied to its build system so its better to tie it to a dedicated single purpose program than a full blown suite.



File: 1486913671070.png (484.8 KB, 300x225, LainWM-1.3Alpha.png)

No.22012 [Reply]

So, after 2 hours of lurking through the internet, i somehow ended up in 2002 and i found a interesting thing.

Apparently the early internet decided to make a LainOS using (lol) FreeBSD.
The attempt was to eventually recreate Lain's Navi Interface and make a functioning operating system.

It sparked my intrigue to see how retro-futuristic or cheesy this stuff was.
After browsing through their site, it interested me how people thought of certain things way back in the past.
http://lainos.sourceforge.net/
If you go on the "about" page, you will find a whole essay on why they created it.

Sadly the project has been lost to the sands and abandoned, although one can still download it and its source code.
63 replies omitted. Click reply to view.

  No.22433

>>22428
What about starting the AI thing, then?
We could also write modules to integrate it with stumpwm. Could be the first step.

  No.22446

>Not naming it Lainux
Mistakes have been maid.



File: 1487301009165.png (197.67 KB, 300x240, tiger.jpg)

No.22133 [Reply]

Anyone experimenting in VR yet?

About to pick up a vive and would love to hear what people are working on.


File: 1487371295593.png (204.2 KB, 300x227, John_Wayne_-_1961.jpg)

No.22155 [Reply]

What are your opinions of the programming bounty?

I believe they provide a good and decentralized means to vouch for features in Free Software projects. It's a directed form of donation that doesn't rely on reputation or other distractions to function, as many would be wary of simply giving money to a random individual, simply because only the end functionality of the request matters.

I see this reason as largely enough on its own to support the general idea, but wonder what any of you have to add to it. It brings a new meaning to the phrase Console Cowboy.

Have you ever participated in a bounty program?
If so, was it worth your time and effort? Would you do it again?
Have you ever started a bounty request yourself?
What's your opinion on the structured platforms for bug bounties?

  No.22163

I think it is a pretty good concept. Mostly because finding exploits used to mean either they thanked you or they threatened you. Now, they realize money is the best incentive and that bugs should be found, not ignored and buried.

As for the actual bounties, I think app exploits are a better avenue than web exploits. There is a large group of people who know web exploits and usually it is very hard to point out a bug several other people haven't already found. But regardless of whether you find anything or not, it still is a pretty fun thing to do in your spare time.

See you, console cowboy



File: 1488025457199.png (16.87 KB, 300x225, d0800ccb6a2011d34dab924ac86c01f0.jpg)

No.22281 [Reply]

For some days I've been trying to wrap my head around the Y combinator. I've tried to follow through the amazing article explaining the Y combinator in javascript, but got lost pretty quickly.
Would you like to share some articles or papers that helped you to understand the Y combinator?
4 replies omitted. Click reply to view.

  No.22572

>>22571
the Y combinator is a function that passes a function to itself as one of that function's arguments.

the passed function can be written to have looping behavior by calling the function it's passed -- which is itself. which it passes the passed function to. which, being itself, does the same thing.

this gives iterative behavior without magical iteration constructs. all you need is function application. and infinite RAM to hold all of these call stacks that you need for something that would ordinarily occupy fixed memory. but in practice tail-calls are optimized and the functions passed to the Y combinator can be written to run in fixed memory.

  : y ( ... xt -- ... )
dup execute ;

: (upto) ( n1 n2 xt xt-self -- ) locals| self xt |
2dup = if 2drop exit then
dup xt execute 1+ xt self y ;
: upto ( n xt -- )
0 swap ['] (upto) y ;

: .upto ( n -- )
['] . upto ;

  $ gforth -e 'include yc.fs 10 .upto bye'
0 1 2 3 4 5 6 7 8 9

  No.22598

https://www.youtube.com/watch?v=FITJMJjASUs

Here's an amusing talk. The guy takes a recursive function apart and arrives at the Y combinator.



File: 1488273280622.png (633.78 KB, 300x227, puddle.jpg)

No.22323 [Reply]

I'm learing GAs in school.
This thread is meant as a way for anyone interested in learning or sharing about GAs to do so.

I will post my progress here, hopefully this doesn't bother anyone or any rule.
If it does, then please tell me and I will stop.
33 replies omitted. Click reply to view.

  No.22708

File: 1490757273920.png (5.04 KB, 67x118, out.tar.gz)

I haven't abandoned yet, I was working on a "hybrid generic algorithm" as my professor calls it.

A hybrid genetic implements a genetic algorithm but uses external knowledge of the problem to make the search more efficient.

Here is the code, now it's python..
I learned that maybe C isn't as bad as some make it out to be.

  No.22709

>>22708
I haven't described the problem that this solves.. it solves this
https://en.wikipedia.org/wiki/Eight_queens_puzzle
Only that it works for n > 8 as well.



File: 1488658675628.png (1.69 MB, 215x300, IMG_2389.gif)

No.22380 [Reply]

Any coders here that have experience with DSP? Specifically DSP that handles and processes audio. I'm really wanting to make some VST/AU plugins for musicians but having trouble getting started since the field seems very math oriented. My strengths with coding lies more in the visual and game logic domain.

The JUCE toolkit (https://www.juce.com/) seems to be promising and what most developers are using.

Just wondering if any anons have experience and advice/thoughts/desire to collaborate.
5 replies omitted. Click reply to view.

  No.22439

Would anyone be interested in a fully deterministic music production environment? Something where given the same project file as input, you would be guaranteed to always produce a bit-identical wave file, even on different ISAs (ARM, x86, RISC-V), and different OSs.

Keep in mind all existing tools need to be thrown out, because they don't offer any such guarantee.

  No.22440

>>22439

not really, the future of music prod stuff is in FPGA/custom hardware implementations, musicians would rather faster/more reliable dedicated realtime tools than be able to work on stuff across different systems, commodity hardware is really terrible for music production, especially live



File: 1489139431246.png (15.67 KB, 143x143, downloadfile.gif)

No.22444 [Reply]

Some love for Esolangs?
I personally like Fractran, Jot and BCL.
You did someone?
If you don't know what these are: http://esolangs.org/wiki/Main_Page

Pic is Piet
6 replies omitted. Click reply to view.

  No.22473

>>22457
>I'm sure that someone has bothered to rigorously define what they mean by random

a number that cannot be outputted by a program smaller than itself is random. Unfortunately generating such numbers reliably is an incomputable task.

https://en.wikipedia.org/wiki/Kolmogorov_complexity

  No.22521

I like Piet a lot, I wrote a bunch of programs for it a while ago, it was fun.
I've always thought of writing an extension of Piet that let you arbitrarily jump to another piece of code but I've never gotten around to it.



File: 1489362099263.png (876.97 KB, 300x284, Screen Shot 2017-03-12 at 4.41.11 PM.png)

No.22478 [Reply]

I've recently gotten really into ProjectEuler and wanted to dedicate a thread to it and similar recreational programming websites. What have your experiences with them been?

At least for me,after progressing to Level 2, I feel like I've sort hit a wall... I try to program the answers for the problems, but most of the times I go about things the wrong way and my solutions take forever to run (and they're not even right most of the times)

I really enjoy doing these problems, but I feel like I'm not thinking about things the right way.

Any thoughts?
15 replies omitted. Click reply to view.

  No.22642

>>22641
I should say, however, your post is absolutely correct in that the first snippet shortens the code segment and the second snippet makes it faster. Just try not to be an asshole, eh?

  No.22643

>>22641
>>22642
Sorry, you're right



File: 1489632004411.png (269.62 KB, 169x300, IMG_20170301_152830.jpg)

No.22517 [Reply]

Hey guys

I'm going through SICP after a break from an intro programming course using C++.

Basically, the book is over my head and so are the lectures, unless I go slow as fuarrrk. I know I'm dumb, but man this really puts the last nail in that coffin.

I find it helps if I keep my text editor open to take diligent notes in LaTex, pause and/or rewind and sometimes even tangentially diverge to Wikipedia or a seperate YouTube video to explain a concept.

Is this normal or am I just dumb? Also, study method general. I generally use scratch paper or create a rough .txt when watching a vid, revise later when reviewing, and keep everything as concise as I can (the concision standard forces me to understand and digest things to be able to repeat it simply).



>pic related
6 replies omitted. Click reply to view.

  No.22537

>>22535

Oh, also, check out the OP in lisp general. It's got a lot of stuff you may find useful. The Little Schemer is a great book to spend some time on if you want to take some time to really get into Scheme.

>>21131

  No.22539

>>22517

It's good to be aware of your weaknesses. You can do this. The industry is full of people who don't understand what they're doing, only they can't admit it and never try to correct it.



File: 1490167195604.png (11.36 KB, 224x224, images.png)

No.22603 [Reply]

Will Lisp Machines ever come back? Will we ever see a move away from the dominant C & von Nueman orientation of computation?

  No.22604

>Will Lisp Machines ever come back?
I doubt it.

>Will we ever see a move away from the dominant C & von Nueman orientation of computation?

I think it's possible. Dataflow architectures are neat and hardware like Chuck Moore's F18A exists.

I'd wager we'll see extreme freedom in computer architecture development if it ever becomes accessible to normal people on a large scale.

  No.22605

This thread is a duplicate of https://lainchan.org/tech/res/35801.html#35801 or
>>>/tech/35801
and has been locked.



File: 1490262502259.png (21.44 KB, 300x266, 1427769367453.jpg)

No.22613 [Reply]

Hello, Lain.
If you had all the time in the world, which projects would you choose for a fullstack portfolio?

Keep in mind it's a theoretical question, ignore time or skill constraints, just focus on what would best showcase front and back end skills.

  No.22615

- Highly customizable spatial mindmap program
- Forth-like language in russian for Z80

These are beyond my skill and time constraint, though technically possible.

  No.22753

>>22613
using web technologies?
frontend: (progressive web apps) GUI development cross platform Desktop, laptops, mobile, phablet, smarttech (watches) et al. languages: html, css, javascript.

backend: building custom systems & customizing / using pre-built systems. user logins authentication. socket connection security (https), information storage retrieval manipulation. languages: nodejs, php, mysql, neu neu, c, python. os: unix (solaris), linux, windows (server).



File: 1490307217707.png (12.33 KB, 300x300, 1073.png)

No.22622 [Reply]

premise: I'm an absolute newbie at programming
I followed a python course in my school, we learned basic methods, objects, lists strings dictionaries etc. and a bit of pyqt4. Now the course is finished and i don't know what to study more about this language: can you reccomend me a few interesting and not too difficult python libraries?
2 replies omitted. Click reply to view.

  No.22629

Try creating a GUI with pyqt, it might be interesting for a beginner.

https://www.tutorialspoint.com/pyqt/

  No.22683

This belongs in the already existing Python thread: >>17682
Alternatively, use the Beginner's General: >>21073



File: 1490532074275.png (346.78 KB, 166x300, Strip-Nous-sommes-tous-Full-stack-english650-final.jpg)

No.22663 [Reply]

traditional Linux admin here with openstack experience. Why should I care about containers? this seems like a developer thing that after 4 years of LXC and prayer cults has turned into something I now have to support at the system level. as a Linux sysadmin i cant find a reason id use this instead of KVM.

-Panic a container, you've panicked the hypervisor

-give access to the docker hypervisor? thats root access on the system

-hypervisor host has to maintain a rube-goldberg machine of iptables to route and load balance port traffic.

-rarely do traditional developers even begin to understand docker or microservices, theyre just going to pack everything into the container and turn it into a mini-VM.
15 replies omitted. Click reply to view.

  No.22699

I don't know anything about it, but I assume it's like apps, everything is an app now, container is the new app. Where is app store for containers. Containers store please.

  No.22700

A microservice is like a bastardised Erlang process. Except nobody understood this when they got popular and now we got a whole new load of bullsoykaf to deal with.



File: 1490720381411.png (193.88 KB, 286x300, photo_2017-03-28_22-27-36.jpg)

No.22701 [Reply]

Hello, /int/eresting people! You dont know me, but i need help. The fact is that I created my Anonym's imageboard. I need friends. Forgive me for the unexpected invasion. Now my board very small. The Internet is the only thing that makes me happy in this life. Life in my country is sad. Very sad. Angry people, dirty streets, high price and taxes - it's in the nature of things
. I just need friendship to make life better. I ask the admin not to delete it. If you agree to friendship, we can get links our sites in header/frameset/banners. I'll put the name under the spoiler so as not to disturb others. Sorry for my anglish. Maybe f-friends?
https://depreschan.ovh
2 replies omitted. Click reply to view.

  No.22704

This is advertising and would normally be deleted, but I'm going to move this to /feels/ right now instead.

This may be locked and deleted later, however, so don't let this get your hopes up.

  No.22705

Moved to >>>/feels/11144.



File: 1490880941587-0.png (3.01 KB, 300x26, out-1.png)

File: 1490880941587-1.png (22.61 KB, 300x202, out-2.png)

File: 1490880941587-2.png (22.68 KB, 300x202, out-3.png)

No.22736 [Reply]

I started working on a text justification algorithm last night, as a fun exercise to see how they work. I've intentionally not looked at the Knuth-Plass algorithm.

I'm doing this in Haskell. I won't give all the code, but enough to follow what I'm doing, hopefully. Here are some basic types:

  -- | A line of text is a non-empty list of words interspersed with spaces of varying size.
data Line = Line String [(Int, String)]

-- | A text justifier takes a line width, list of word (and word fragment) sizes, a minimum space width, a list of words, and produces a list of lines
type Justifier = Int -> [(String, Int)] -> Int -> [String] -> [Line]

out-1.png was just a test, to make sure I could actually render things to an image.

  justify1 :: Justifier
justify1 _ _ iota (w:ws) = [Line w [(iota, w') | w' <- ws]]
justify1 _ _ _ [] = []

out-2.png is a simple greedy ragged-right: put words on a line until they don't fit any more.

  justify2 :: Justifier
justify2 width sizes iota = go ([], 0) where
go (sofar, len) (w:ws) =
let newlen = len + iota + fromMaybe 0 (lookup w sizes)
in if newlen > width
then case reverse sofar of
(word:rest) -> toLine word rest : go ([], 0) (w:ws)
[] -> Line w [] : go ([], 0) ws
else go (w:sofar, newlen) ws
go (sofar, _) [] = case reverse sofar of
(word:rest) -> [toLine word rest]
[] -> []

toLine word rest = Line word [(iota, s) | s <- rest]

out-3.png is what I have decided to call "web browser text justification", it's the awful algorithm which makes justification such a no-no on webpages. First, allocate words to lines with ragged-right, then evenly spread spaces to use up the extra space. It can be implemented as a simple modification of the ragged right function.

  justify3 :: Justifier
justify3 = padWords justify2

padWords :: Justifier -> Justifier
padWords justifier width sizes iota = padWords' width sizes . justifier width sizes iota

padWords' :: Int -> [(String, Int)] -> [Line] -> [Line]
padWords' width sizes = go where
go [] = []
go [lastLine] = [lastLine]
go (l@(Line w rest):ls) =
let slack = width - lineLen sizes l
gaps = lineWords l - 1
wordSlack = slack `div` gaps
extraSlack = slack - wordSlack * gaps
extraSlackPos = 42 `mod` (gaps - 1)
in Line w (go' wordSlack extraSlack extraSlackPos rest) : go ls

go' wordSlack extraSlack extraSlackPos ((gap,w):ws)
| extraSlackPos == 0 = (gap + wordSlack + extraSlack, w) : go' wordSlack 0 0 ws
| otherwise = (gap + wordSlack, w) : go' wordSlack extraSlack extraSlackPos ws
go' _ _ _ [] = []
6 replies omitted. Click reply to view.

  No.22757

>>22756
Lainon delivers! That was quick, and looks fuarrrking nice too.

  No.22761

File: 1491082456523.png (1.13 MB, 32x200, doc.png)

This will be the last update, unless I have any fantastic new idea. I wrote some combinators on images and rendered this thread.

I think the result is pretty nice.



File: 1491087529803.png (10.57 KB, 230x230, Anime+reaction+pics_14cfb6_6105111.jpg)

No.22762 [Reply]

I am really dumb
Can someone suggest me where Artificial Neural Networks are explained in great detail?

  No.22767

anyone?
plz
;_;

the body was short...so yea...

  No.22769

Firstly, you should really use a relevant image to start a thread with.
Secondly, there is a stickied thread, the Beginner's General, specifically for simple questions such as this that can't sustain nor deserve their own thread: >>21073
Thirdly and lastly, there's already a thread concerning itself with neural networks and machine learning: >>17131

You should also be more patient in the future. This isn't what many would deem a fast imageboard.



File: 1491111192953.png (2.12 KB, 300x114, image008.gif)

No.22770 [Reply]

What kinds of markup do you think are nice?

I'm a fan of Markdown (over bbcode), but I'm currently working on a lisp-like markup language that will output to HTML.

It resembles:
- https://github.com/tawesoft/bach
- http://cairnarvon.rotahall.org/misc/sexpcode.html
- https://arclanguage.github.io/ref/html.html
3 replies omitted. Click reply to view.

  No.22775

I think Markdown's fine for most purposes.
If I wanted something more complex I'd probably look into something like Racket's Scribble or Pollen.
I'm trying to remember the name of this other Lisp-like wiki system that I've seen around but I can't for the life of me. It was a french project (though of course it was translated in english), and it used {} for escaping its own flavor of Lisp. The website looked pretty comfy.

  No.22784

LaTeX I think is the nicest markup language, but mostly because I use it for mathematical formulae and especially for symbols such as greek letters that are not readily available on the keyboard.
I've been meaning to go to /q/ and ask for LaTeX tags actually



File: 1491364412924.png (138.13 KB, 300x222, IMG_-qcq7kh.jpg)

No.22803 [Reply]

Working on a new markup language

shouldnt it be the Lainchan imageboard markup language
8 replies omitted. Click reply to view.

  No.22823

There are already a lot of great programmable web markup languages to replace html and css that use a Python-like syntax of using indentation to replace brackets. They are very clean looking and readable, so I wonder if anyone has made a parens-less Lisp that uses indentation like Python?

  No.22829

Hey Opie, your project is good not because it will replace html but because it interests you. You have much to learn from this, even if it isn't entirely useful yet.
good loch



File: 1492696954248.png (5.26 KB, 300x282, logocaml-oreilly.gif)

No.546 [Reply]

FSharp versus OCaml?

Which do you prefer?

Mostly interested in the different feelings people have about writing the two, without mentioning their runtimes as much.
9 replies omitted. Click reply to view.

  No.701

>>699
>Have you ever tried F#?
I dont use windows. And I am aware that F# can be used crossplatform on Mono but I dont believe that the Mono ecosystem is ever going to take off unless it gets more support from MS

The math functions can be overloaded afaik, do you ever use SML for the proofing?
The type checker in both SML and Ocaml are massively polymorphic and will check through inference that the type signature is exhaustive, that is, will make sure every possible input type is known at compile time. The price of overloading math operators in SML is that it cant be inferred at compile time so has to be explicitly declared.

And no I dont use SML for logic proving although I am currently learning mathematical logic. I would like to learn how logical proofs can be used in machine learning at some point but I probably am not smart enough to ever get to that level.

  No.710

>>699
>Have you ever tried F#?
I dont use windows. And I am aware that F# can be used crossplatform on Mono but I dont believe that the Mono ecosystem is ever going to take off unless it gets more support from MS

>The math functions can be overloaded afaik, do you ever use SML for the proofing?

The type checker in both SML and Ocaml are massively polymorphic and will check through inference that the type signature is exhaustive, that is, will make sure every possible input type is known at compile time. The price of overloading math operators in SML is that it cant be inferred at compile time so has to be explicitly declared.

And no I dont use SML for logic proving although I am currently learning mathematical logic. I would like to learn how logical proofs can be used in machine learning at some point but I probably am not smart enough to ever get to that level.



File: 1492889436371-0.png (530.01 KB, 200x119, dataflow-md5.png)

File: 1492889436371-1.png (68.11 KB, 200x189, 1084px-Multithreaded_process.svg.png)

File: 1492889436371-2.png (484 KB, 200x142, Wilson1900Fig2.jpg)

No.591 [Reply]

This is a thread to discuss various systems for writing parallel programs, at any level of abstraction, from the bare machine to a high-level language. It seems reasonable to say that it's easiest for most of us to think sequentially, when programming. It's somewhat difficult to consider machines in which every instruction operates ``at once'', at least for complex tasks. Even cells have some manner of sequential behavior.

It's certainly easiest for me to consider parallel operation as sequences of sequential instructions happening in not necessarily meaningful orders; how do you consider parallel operation most easily?

Which method(s) do you prefer to write a parallel program?

Do you prefer dataflow, where you build pipelines of sorts?
Is it instead the event-driven method, in which one provides an interface and actions and largely leave it at that?
Is simple multi-threading, needing no introduction, your favorite?
Do you prefer to ignore these details and let the system parallelize your programs for you?
Do you prefer a system or method I've not mentioned; if so, do explain it.

An example I like of a program in which every instruction executes ``at once'' is a program that calculates an approximation of a sum by each instruction calculating each individual value and adding them to the same location. This ignores populating memory with these instructions.
4 replies omitted. Click reply to view.

  No.703

>>702
That's because communication is at a higher level of abstraction than how threads execute.

  No.708

I've had some experience with writing parallel programs as part of my degree. I've used OpenMP, MPI, OpenCL and CUDA (and also had a brief look at pthreads and C++11 threads). I find MPI hard to deal with, but the benefits are huge in terms of performance if you can use multiple CPUs. OpenMP is usually the easiest to use but it is interesting to note that I have been able to get better performance out of OpenCL (on the same CPU), providing the problem size is large enough to outweigh the higher overhead. Obviously the problem with CUDA is that it's proprietary and the problem with OpenCL is that most implementations are proprietary (I've never got Beignet to work).

Honestly now that I'm used to the OpenCL API I'd much rather use it than anything else, especially for one device. I guess for multiple CPUs MPI is king.



File: 1432710145070.png (2.08 MB, 300x233, 1432709920847.gif)

No.6264 [Reply]

I've been meaning to make this thread for quite a while now.

Let's discuss the programming languages that are further down the abstraction ladder than the heavily abstracted languages popular today.

Most importantly, let's discuss languages and programs written in them that don't require an operating system to function or even computation expressed as in my image.

So what do you like about them, Lain? The assembler languages, Forth, among other languages and all that, are all interesting and welcome discussion points.

What I prize most about all of this is how you gain a real understanding of what modern computation is from it all. So many people program who don't know how these things actually work. You can't be good at anything without an understanding of what that thing actually is. So many people also don't have any variety in what they mess around with.
119 replies omitted. Click reply to view.

  No.21201

>>21200
Also apologies for double posting, but are 6502 ASM programs supposed to be so unclean? I don't know how to write this stuff properly.

Should a program that moves a sprite around on a black background really be 58 lines (not counting the sprite byte data I put at the end) ?

  No.21209

>>21201
Yeah mang it's assembly



File: 1434539907934.png (52.88 KB, 300x300, gophercolor.png)

No.6735 [Reply]

What do you think about golang? I've started learnig it and it looks good to me so far.
188 replies omitted. Click reply to view.

  No.21287

>>21262
>given that Google controls most about the language now.
how does it do this exactly? by being the biggest contributor in an otherwise open source project?

>>21266
>I suppose my next question should be how easy to audit the Go tools are.
source is freely available and almost all of it is written in Go. i dig around a lot in the compiler parts of the language it is super easy.

  No.21289

>>21287
>how does it do this exactly? by being the biggest contributor in an otherwise open source project?
It's my understanding that Go is very much a "you get what we give you and nothing else" kind of language and that all or most of the designers work for Google and steer it towards what Google wants.



File: 1435373031905.png (498.22 KB, 300x169, tumblr_mxhwchMD6k1skyf48o1_500.gif)

No.7062 [Reply]

So, I've been working on developing my own i686 kernel, and I thought I would see if anyone else has had a go at operating system development. If not, who is insane enough to want to try?

My main issue at the moment is getting interrupts, well, working. Fun stuff! I would like to see what the rest of /λ/ thinks.
97 replies omitted. Click reply to view.

  No.21329

>>21320
the webpages of many of those projects will often have very in-depth discussions of how the OS is different from other OSes. That and osdev.org is how I learned most of what I know about operating systems.

  No.21370

>>10579
>Tanenbaum
Are you reading "The Dinosaur Book"? :DDDDDDDD

I think critical reading for OS design is that book and the MINIX book. If you spend a month or so tinkering with MINIX (Implementing memory-fit algorithms and processor schedulers), you would definately then be able to tinker with Linux and other Open Unix systems.



File: 1438207195941.png (549.53 KB, 300x196, image.jpg)

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.
38 replies omitted. Click reply to view.

  No.20879

>>20873
ESR took over from GLS as maintainer. He did alright for a while (adding what needed to be, etc: JARGON is, in theory, a living document), but ESR is, as we all should know, fuarrrking batsoykaf insane, so he started to fuarrrk it up eventually.

It's still mostly intact, though.

  No.20907

This is a good docudrama about the British computer industry, sort of the brit version of Revenge of the Nerds
https://www.youtube.com/watch?v=hco_Av2DJ8o



File: 1492070593719.png (2.05 MB, 231x300, BASIC_Oct64.pdf)

No.83 [Reply]

Last thread was KIA so here's a new one.

Post books about programming here, and request more if you don't have'em.
141 replies omitted. Click reply to view.

  No.707

Anyone have:
* Android Hacker's Handbook
* Android Security Internals

  No.709

File: 1493051430836.png (2.05 MB, 212x300, Linux Binary Analysis.pdf)

>>705
Thank you!
Here's one about the ELF format



File: 1439511436822.png (23.45 KB, 300x50, greetings-to-the-user.png)

No.8491 [Reply]

Here's a challenge I find more interesting than the fizzbuzz seen so often: Greetings to the User

You are to write a program that does the following:
Print "What is your name? "
Read input from the user.
Print "Greetings, %s." where %s is the aforementioned input.

Try to make it as small as possible for more fun. Let's see who can write the shortest solutions in the different languages.

Forth (65 chars):
." What is your name? "pad dup 9 accept ." Greetings, "type ." ."

Common Lisp (65 chars):
(princ"What is your name? ")(format t"Greetings, ~a."(read-line))

Emacs Lisp (58 chars):
(format"Greetings, %s."(read-buffer"What is your name? "))

I consider this to be a better metric for judging languages than the simple hello world. It certainly shows more characteristics of the language.
I wonder what variety we'll see here.
126 replies omitted. Click reply to view.

  No.21767

>>21726
,use(ice-9 readline)(string-append"Greetings, "(readline"What is your name? ")".")

down to 82 chars

  No.22464

>>21535
fstrings are byte code optimized. For runtime it's better to use string formatting.



File: 1442750574870.png (1.3 MB, 200x300, 1433792574974.png)

No.9620 [Reply]

I failed to see a topic on this already, so I thought I would start one on programming language design and implementation. It seems the Compiler discussion atrophied so I thought I would add implementation into the mix.

== Resources ==

> LLVM Language Implementation Tutorial

http://llvm.org/docs/tutorial/index.html

> Implementing Programming Languages

http://www.cse.chalmers.se/edu/year/2012/course/DAT150/lectures/plt-book.pdf

> CPython internals: A ten-hour codewalk through the Python interpreter source code

http://pgbovine.net/cpython-internals.htm

> Compilers: Principles, Techniques, and Tools (2nd ed)

https://mega.nz/#!sp8BUSRL!okEt_Eo3h7RtvfZm6bIcmRuZqMo0fiJky9MIye4Tz7U

> Essentials of Programming Languages (3rd ed)

https://mega.nz/#!Z8cEHDIS!L96la8aeeai2sZx7Nij4XPlxNUpaKGznKcxrNrIYpjI

> Modern Compiler Implementation in C

https://mega.nz/#!Y5tC1IhA!sesyVwxWBMG0TC1R9C6DuOqzWhUG4XmhIsOlGbPSHTQ

> Compiler Optimization and Code Generation

http://bears.ece.ucsb.edu/class/ece253/compiler_opt/c1.pdf

> Garbage Collection Algorithms

http://courses.cs.washington.edu/courses/csep521/07wi/prj/rick.pdf

More to come
119 replies omitted. Click reply to view.

  No.19318

>>9668
I would suggest this:
read A Gentle Introduction to Symbolic Computation, write your lisp based on the language as it is presented chapter by chapter. (starting from chapter 3 or 4, when cons cells are introduced).
You'd start off with a very simple parser (if you need help with recursion read The Little Schemer), and an implementation for cons cells. And would be gradually building up from that

  No.20019

>>18931
It's just the opposite of an else. It only gets evaluated if the last conditional was true. It sort of functions like putting your code directly into the 'if' block does, but because of the fact that conditionals are functions and not structs in DeviousYarn, you can throw some statements in between. You can also use the alf/'also if' to function sort of like a conditional within another conditional would. I think I've got them all written up in the wiki on the Github, so if you can compile go programs, feel free to give it a try.



File: 1443441224533.png (9.79 KB, 300x188, handover.png)

No.9922 [Reply]

Certain things are easy to program, because the problem is well understood beforehand, or it's easy to split it up into parts that have little or nothing to do with each other, or maybe it's programming for fun and the final result is not that important.

But some times, ...there is a sense of need to completely design the system beforehand, to cover the edge cases without needing to redo half the program halfway in, because it needs to be able to do that thing as well, which changes everything. To get it right from the very start. Even if Murphy ensures the futility of that goal.



I tend to draw/write sketches that I never read, which is just as well, because they are never documented enough that they make sense, should I actually forget what I was thinking at the time.
A lot of the time it seems like I redraw the same sketches with few or no changes each time I think of the problem.



How do you do it?
32 replies omitted. Click reply to view.

  No.17815

>>14247
What useful project did you write in Scheme?

  No.20578

>>9922

My exact tactic tends to change with the problem I'm working with. When I deal with data-structures I write them out on a napkin to get a better visualization. I even sometimes go iteration by iteration with this model to make sure my data-types conform and behave like I expect/intend them to.

For more Object oriented languages I would write out my inheritance model along with what methods get passed around on a piece of paper and play with the bubbles until I got a good sense of the underpinning design.

In a language like Haskell, I tend to play type Tetris in my head along with the next technique.

The other major technique I always employ is just throwing basic functions at the REPL in order to confirm functions behave as I expect. In Haskell this would be help conforming my Type Tetris and for the quick check of function input and output, in Lisp this would be testing simple operations and testing finished functions (which end up allowing me to quickly morph and conform functions to better forms), and for languages like Java I end up just using it in order to try out the weird syntax they have introduced.