Old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Other urls found in this thread:
docs.python.org
google.github.io
lispcookbook.github.io
tldp.org
github.com
twitter.com
>anime
fucking cringe
All you need are Common Lisp and C.
learning how shellcodes work, i created a really retarded one in nasm but then i looked at the msfvenom one and it's like a million times better and very big brained compared to mine... but mine wasn't flagged
Cute girl
>mfw imbe-C-iles cannot into OOP
Hey guys i teaching myself Data Structures in c++, i'm following the (picture related) book, but it doesn't show how the fuck you print/show the whole list, any suggestions of how can i do that?
Thanks in advance.
class DLinkedList { // doubly linked list
public:
DLinkedList(); // constructor
~DLinkedList(); // destructor
bool empty() const; // is list empty?
const Elem& front() const; // get front element
const Elem& back() const; // get back element
void addFront(const Elem& e); // add to front of list
void addBack(const Elem& e); // add to back of list
void removeFront(); // remove from front
void removeBack(); // remove from back
private: // local type definitions
DNode* header; // list sentinels
DNode* trailer;
protected: // local utilities
void add(DNode* v, const Elem& e); // insert new node before v
void remove(DNode* v); // remove node v
};
iterate over the members of the list and print them how you want.
sorry i forgot the picture.
I love Akane!
wish I was her
Please do not use an anime image next time. Thank you.
(OP)
Please continue to use an anime image next time. Thank you.
Lisp is the most powerful programming language.
Cute girl
I made a scrapper in Java using the Jow Forums API today because I have a technical interview for a codemonkey job in 12 hours. I will watch an Angular crash course video as a refresher with my morning coffee and hope it will be enough to not spill my spaghetti all over the office and get me a junior position in a Java shop once again.
This has no caching mechanism whatsoever, sorry gookmoot.
Please refrain from using anime images for this thread next time, thank you.
i've been working with clojure for a while now and decided i want to try common lisp.
it seems a little tricky to pick an implementation though. how is CCL? from my research it looks like a reasonable all-rounder.
I thought this was going to be a cool scrapping program for internet artifacts, but instead it's just a scraper.
PS no one studies pascal.
people study Nim though, and Nim has the result thing
Thanks for the query. Never heard of Nim, but it named dropped ADA.. soo... why not.
You can't go wrong with CCL, ECL, or SBCL. I used CCL before SBCL got its ARM support and it worked perfectly fine. However, I switched over to SBCL since it's more actively developed. ECL is a curiosity because you can compile to C. It comes with quicklisp too (with the others, you have to download quicklisp).
>using jewish software unironically
that's good info, thanks.
i was motivated to pick CCL partially because i read it has nice errors/stack traces, clojure's are hard for me to understand often since i don't know java.
i'll take a look into SBCL too.
Didn't know "scraper" and "scrapper" had different meanings, my bad.
that's 'clisp', an interpreted implementation written in C, not at all like what he listed as can't-go-wrong choices.
if you're using Clojure for the Java interop, ABCL has that as well.
And if you miss the Clojure stuff, grab a copy of Let Over Lambda; you can recreate all that in CL.
he's probably referring to mccarthy's ethnicity.
I wrote a Virtio-blk driver today for TempleOS, it's a loadable device driver so you don't have to recompile the Kernel.
I want to nakadashi Akane
What is virtio-blk?
I'm working on my music composition / DAW software, lambDAW.
Currently don't have much but this shitty score-renderer and the beginning of a grammar for the associated language, and knowledge of the fact that no one seems to have released a permissive-licensed phase vocoder implementation. I'm actually pretty pleased with GPL to see how big a community of nice audio / DSP libraries seem to exist, but it'd be nice if there was a permissive-licensed library that many audio companies could help contribute to. (I'm not sure if I want to open source this).
Also logos. If I do end up open sourcing it, that lamb really has the "open source project logo animal clipart" spirit.
i just chose it because it seemed like a nice way to get into FP and lisp. community seemed nice and plenty of good documentation. interop is nice but just a bonus, and the jvm comes with its own quirks and annoyances, as i've found out.
let over lambda is maybe a little too advanced more my smooth brain, but i'll give it a go.
It's a paravirtualized block device for a KVM guest, shows up as a PCI device to the VM. I have a web server that I wrote for TempleOS awhile back running on a cloud instance, and I wanted a way to store persistent data since the host doesn't have ATA disks attached, only Virtio.
How do I transition from Racket to Lisp?
How is that possible when temple doesn't have a networking stack?
Get on my level redguards.
>buying shitty books for ancient languages you'll never touch beyond a hello world
zzzzzzzzzzzz
when you get quicklisp, quickload clhs. it's a local copy of the hyperspec. Common Lisp Recipes is a decent reference. So is On Lisp. this is a style guide if you decide to write code other people will use. google.github.io
minexew wrote a PCNet driver and TCP/IP stack several years ago, and I wrote a Virtio-net driver a few months ago.
download SBCL and start hacking away
>he doesn't do the random maze program for L337 h@x0r skillz
the lisp cookbook is a pretty good resource too. lispcookbook.github.io
how do I learn BASH programming?
Im doing exercise 1.13 and 1.14 in K&R , which have to do with displaying histograms about data that gets inputted (input a sentence and get a histogram of letters used or word length or whatever). Ive done the horizontal version of 1.13 easily, but there's an issue: the program works perfectly fine with gcc on redhat, but when I compile the same source code with minGW on windows, the output it correct but then its followed by like 1000 'b's. Is this worth worrying about?
Also, I still havent dine the vertical bars yet, but the way I want to do it is O(n^2), where for every row in the graph I have to iterate through my data array and find if I need to place a character in a given column (example: Im on row 1 of output, say ita height 4. I iterate through the data array and see if any of the entriee is 4 so I print a character in that column; I do this iteration for every row of output, so n^2). Is there an obvious way to make this more efficient?
>All you need are Guile and C.
FTFY
thanks for the resources.
i settled on SBCL in the end, not least because it's in my package manager and CCL isn't.
how do i set up quicklisp? do i just need to run their lisp file and it'll work, or is there extra config that needs doing? search engine mostly talks about setting it all up with emacs, which i don't use.
yes, it's worth worrying about. your code has a bug.
>vertical bars
instead of writing to stdout as you loop over stuff, prepare an 2d output buffer and loop over your data once and updating the buffer. Then write it.
enter (load #p"path/to/quicklisp.lisp") into SBCL and it'll display instructions. you can also verify the file with gnupg if you want beforehand.
All npcs are demons. All real humans are actually werewolves but the demons cast a spell to suppress our werewolf powers. They are planning on moving all technological interface to touchscreen and then reversing the spell because werewolf claws can't use touchscreens. The demons will then have full control over all technology. Resist their evil plans and keep programming using keyboards and mice to fight the demonic plot to phase them out. Good luck and God bless.
Yeah I kind of figured it was something like that. Thanks.
>ever programming using touchscreens
Why?
>try to write a library
>give up because it's too much work
I just wanted to write a wrapper around Gtk that fundamentally changes how the whole thing works
For what reason?
i want to nakadashi akane-chan
>try to write a library
>give up because it's too much work
This, but everything I try to do.
Do all the Lisp and sepples shills congregate here because every normal person thinks they're a pain in the ass?
What can I make with lisp, and which type of lisp should I use to make it?
Do no associate me with sepples, thanks.
Anyone know some good python challenges with difficulty tiers and hints like overthewire has?
sepplisp
Checked and seconded. I want random challenges I can complete in half an hour. I'm kind of tired of big projects that take a month.
that blue xenith though
Write the smallest useful part of the library you can think of.
I'm going to do it. I'm going to start a new project after nocoding for months now. Please pray for me.
what language
Ada!
what are you making?
A train simulator. Like a baby OpenTTD.
I believe you meant R5RS Scheme and C.
Post a repo link
please respond
I self host fossil on my private network.
make something you're interested in.
SBCL or Chicken Scheme.
It's not open source if you don't share it.
Why does it have to be open source?
So we can see what you made? So employers can see what you made? So you can give back to the community instead of being a leech? Pick your favorite reason.
I'm just starting the project and I'm already employed. Are you trying to take over my project?
No, it's just not often anyone writes Ada and i'm curious as a fellow Ada lover.
>What can I make with lisp
anything, it's turing complete
>which type of lisp should I use to make it?
depends what you're doing, but SBCL is a sensible choice if it's nothing with special requirements.
I'll consider it once I make some real progress and get off the ground.
Say I have two shared pointers.
I want to re-assign one to a new object (returned by a function pointed to by the other shared pointer object). Am I not supposed to do this? Because using = doesn't work.
Example:
sharedPointer1 = SharedPointer2->next();
next() returns a variable of the same type.
what's the correct way to change?
How do I make a pure fpl that's actually useful? At this point I don't even care about speed. I'll make it interpreted and as bloated as it needs to be. I just want an fpl that's pure but more useful than Haskell.
Mercury already exists. Its only barrier to usefulness is popularity.
Clean is probably also a decent candidate, I dunno. It's weirdly Windows-centric and had some licensing or proprietary shit on top of that, which may have changed since then.
Is there a license that basically "you may look at my code but not use it in any means"?
What did Mercury do right?
>What did Mercury do right?
Nothing, Mercury is still just a stepping stone, there's still way too much prolog shit left in it.
software patent
#include
int main() {
printf("Hello World! \n");
return 0;
}
Trying to learn how the fuck to compile an exe in fedora.
uniqueness types for I/O.
impurity declarations.
and having a syntax that tends to punish you for airy FP bullshit.
The pattern of 'impurity declarations' is repeated several times in the language. You can use purely functional data types like bt_array and map or you can use mutable data types like array and hash_table, and the big difference is just that the latter is a little bit more of a hassle - a hassle that's felt in declarations rather than in code.
gcc -Wall -o hello hello.c
./hello
Functional programming sucks.
git gud
FP is good like OOP is good, where people start by saying, "well, it's not good, but this thing and that thing and that other thing are all good", where those things are all implied by the term.
referential transparency is good. FP pushes that; other languages don't as much. ML datatypes are good. FP pushes them; few non-FP languages even have them (ex. Ada, Nim, C++ technically but it's so much more annoying to use). Immutable is a better default than mutability.