Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Toolkit

Name: Anonymous 2007-05-23 11:26 ID:WQYBBvWQ

Hey guys, I'm putting together a toolkit of commonly used things that I can plug into programs rather than writing them from scratch every time and I want to know what I should put in it.

So far I've got a stack, doubly-linked list, double-ended queue, and binary search/sort algorithms.

What else does /prog/ think I should put in there?

Name: Anonymous 2007-05-23 11:37 ID:Heaven

A Lisp interpreter.
Or Glib.

Name: Anonymous 2007-05-23 11:47 ID:kx1qwFbF

I think you should switch to a real language.

Name: Anonymous 2007-05-23 11:52 ID:WQYBBvWQ

>>3
I haven't even mentioned what I'm using.

Name: Anonymous 2007-05-23 12:01 ID:kVEF2Zu2

>>4
It can't be that good if such common data structures and algorithms aren't provided by a standard library.  AFAIK C++ already provides everything you've done, whereas something like Prolog makes it and unnecessary and irrelevant.

Name: Anonymous 2007-05-23 12:06 ID:kx1qwFbF

>>4
Yeah, if your language doesn't have even such basic features, it sucks. If it is C (I hope so), consider it as a necessary evil and use it only when absolutely necessary, and use FFI to take care of the rest. If it's not C, scrap it.

Name: Anonymous 2007-05-23 12:39 ID:kVEF2Zu2

I see no reason to use C for anything except OS kernels, microkernels or device drivers.  For applications, higher-level languages like Haskell or Prolog seem better.  If you need  speed, you can write ***the parts that profiling indicates are slow*** in C++ that runs just as fast as C (check out the performance TR).

I have also seen it argued that C is a good teaching language because it's smaller than C++, Java, etc.  But following this line of reasoning, Scheme is better again.

Name: Anonymous 2007-05-23 13:37 ID:WQYBBvWQ

EVRY BUDY LUVS GOOD OLD BIFF CUZ HES A KEWL DOOD AN HE RITES REEL AWESUM THINGZ IN CAPITULL LETTRS LIKE THIS!!!

Name: Anonymous 2007-05-23 15:01 ID:LQZm8IK+

>>1
your application to McDonalds

Name: Anonymous 2007-05-23 15:19 ID:WQYBBvWQ

>>9
I lol'd.

Name: Anonymous 2007-05-23 16:00 ID:HcAWEHED

IT'S A WHEEL

Name: Anonymous 2007-05-23 16:06 ID:Heaven

>>11
Wheel 2.0 is more .NET.

Name: Anonymous 2007-05-23 16:25 ID:WQYBBvWQ

>>12
Wheel 3.0 is as .NET as possible.

Name: Anonymous 2007-05-23 19:09 ID:iXuPRyQw

>>7
Along this line of thought x86 Assembler is the best teaching language, but just maybe I'd start with a scripting language or basic. BTW, you can't write an OS-kernel in C alone, both NT and Linux kernels are optimized in assembler or straight-forward machine code(you can't write firmware even on assembler).

OP: you include things in your libraries as they become relevant that way they don't have a lot of cool sounding functions, which will you never need.

Name: Anonymous 2007-05-23 19:31 ID:NYV+yW9e

>>1
Put Lisp

Name: Anonymous 2007-05-23 19:41 ID:qbMg2zrs

>>14
7 here. I meant "smaller" in a very vague sense, to do with what psychologists call cognitive load. While individual assembly languages _are_ simple, programs written in them are not. As you identified, scripting languages would also be a good choice for teaching, perhaps not BASIC though :-)

I've no idea about the NT kernel (and you don't either, or else you wouldn't be allowed to say so in public). I am familiar with some Unix-like OSs though (Plan 9, Inferno). They use a tiny amount of assembler (I count about 1KLOC in Inferno) but it isn't for optimisation it's because C can't express some operations on modern processors. Using assembler for speed no longer makes sense because scheduling of separate execution units, delay slots, etc. ensure that compiler output will usually outperform hand-coded assembler.

Oh, and modern firmware (by which I presume you mean BIOS on a PC) is often written in assembler. It has been written in Forth in the past (OpenFirmware on SPARCStations and Macs), but no more AFAIK. LinuxBIOS is written in mostly C, with a little assembler.

Name: Anonymous 2007-05-24 4:38 ID:Dwnd/zzO

>>16

NT kernel source code was leaked a couple of years back. It's mostly C. Lurk moar.

Name: sage 2007-06-05 8:06 ID:Heaven

>>16
Heh. I learned assembler by reading the BIOS source listing IBM gave you when you bought the original IBM PC.
I'm old.

Name: Anonymous 2009-01-14 14:32

everything worth doing requires monads

Name: Anonymous 2010-11-28 3:57

Name: Sgt.Kabu᪅雳kiman䭕ﺩ 2012-05-29 2:32

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Name: Anonymous 2012-05-29 2:42

nb

Name: [ Sgt.Kabu᪅雳kiman䭕ﺩ 2012-05-29 2:43

b b

Name: Anonymous 2012-05-29 3:02

dickbutt

Name: ﺩ John 2012-05-29 3:13

joh?

Don't change these.
Name: Email:
Entire Thread Thread List