uip
winner
uip | winner | |
---|---|---|
5 | 7 | |
871 | 481 | |
- | 3.7% | |
0.0 | 4.4 | |
over 7 years ago | 3 months ago | |
C | HTML | |
- | Creative Commons Zero v1.0 Universal |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
uip
- Show HN: MicroTCP, a minimal TCP/IP stack
-
I need to create a UDP server using uIP library on LPC1768. could you please share a code example with me or lead me to write it myself? thank you so much
As the other commenter pointed out, uIP seems to be from 9 years ago. From the issues in the project, I found it is part of Contiki. Are you developing using Contiki?
- Need help to use uIP library for running UDP on LPC1768
-
An HTTP server in a single .c file
The CPU architecture is actually the least of your concerns there—I'm pretty sure qemu-user can run httpdito on ARM with less than an order of magnitude performance overhead. There are a lot of embedded systems where an HTTP transaction per second per MHz would be more than sufficient.
The bigger problem is that the Raspberry Pico is a dual-core Cortex-M0+, which doesn't have an MMU, so it can't run Linux and especially can't handle fork(). But httpdito is basically scripting the Linux system call interface in assembly language—it needs to run on top of a filesystem, an implementation of multitasking that provides allocation of different memory to different tasks, and a TCP/IP stack. Any one of these is probably a larger amount of complexity than the 296 CPU instructions in httpdito.
The smallest TCP/IP stack I know of is Adam Dunkels's uIP. Running `sloccount .` in uip/uip cloned from https://github.com/adamdunkels/uip gives a count of 2796 lines of source code ("generated using David A. Wheeler's 'SLOCCount'."). uIP can run successfully on systems with as little as 2KiB of RAM, as long as you have somewhere else to put the code, but for most uses lwIP is a better choice; it minimally needs 10KiB or so. uIP is part of Dunkels's Contiki, which includes a fairly full-featured web server and a somewhat less-full-featured browser. I think he got both the server and the browser to run in 16KiB of RAM on a Commodore PET, but not at the same time.
(twIP http://dunkels.com/adam/twip.html is only 139 bytes of C source but doesn't support TCP or any physical-layer protocol such as Ethernet, PPP,or SLIP.)
However, Adam Dunkels has also written Miniweb http://dunkels.com/adam/miniweb/, which implements HTTP and enough of TCP and IP to support it, in 400 lines of C. It needs at least 30 bytes of RAM. Like twIP, it doesn't provide a physical layer. But that's solvable.
-
uIP's network device driver (and Contiki's version of uIP)
I am currently reviewing existing TCP/IP stacks for microcontrollers, and in particular uIP.
winner
- Radiation-hardened Quine: A quine that works after any one character is deleted
-
concise code vs code longer than necessary.
Don't write code like the obfuscated C code contest. Don't spend too much time modifying working code to make it shorter, especially if there's no end-user perceivable speed increase.
-
Kilo Lisp: A Kilo Byte-Sized Lisp System
Just found one after replying to another comment on this story.
https://github.com/ioccc-src/winner/blob/master/1989/jar.2.c (accompanying explanation: https://github.com/ioccc-src/winner/blob/master/1989/jar.2.h... )
It apparently works somewhat after a few minor tweaks.
Another one that I've bookmarked some months earlier: https://github.com/rui314/minilisp
-
A horrifying single line neural network using NumPy
The first one is "a bit" obscure. If you give up (which means you've passed the human test... if you do not give up, report for alien termination) check out the description
-
An HTTP server in a single .c file
One of 2004 IOCCC winners (2004/hibachi [1]) was a CGI and vhost capable HTTP server. It is one of a few winning entries that ever came with its own ./configure, and violated so many guidelines but not a single rule, making judges pretty upset.
[1] https://github.com/ioccc-src/winner/blob/main/2004/hibachi.h...
What are some alternatives?
darkhttpd - When you need a web server in a hurry.
contiki-ng - Contiki-NG: The OS for Next Generation IoT Devices
publictext - TEXT://PROTOCOL SERVER
microtcp - A minimal TCP/IP stack
uncroppable - Make your image uncroppable
bashttpd - A web server written in bash
stoneknifeforth - a tiny self-hosted Forth implementation
sectorlisp - Bootstrapping LISP in a Boot Sector
cosmopolitan - build-once run-anywhere c library