how does the pthreads depend on the application I mean how do I configure my code to use kernel threads do I have
I’m asking because I can’t upload a web page to them
No.
What is better coding practice: Using if and else-if, or using the switch statement with cases?
switch cases work only with integer constants
generally if a switch expresses your intention better, you should use it.
if you can use a switch, and it doesn’t detract from clarity, i would recommend it
Why is that? Just easier to read?
sourceforge is so old fashioned, everything is done with SSH and CVS…
personally i like switch statements, but also, the compiler can generate optimized code due to the integer constant test
that’s not to say that it couldn’t do the same with if-else
there is just one rule here — use the least horrible option.
that’s subjective
of course it is subjective.
hey Zhivago
and Zhivago: Alright, so its just better… I dont know what the optimized code due to integer constant is so I will just stick to “its better”
hello libra
forget the optimization
look at what _reads better_ to a human being.
Alright, that makes sense.
good — code is for humans first — computers come second.
you can always add horrible optimizations in a transparent manner to clean code.
Zhivago is right. premature optimization is evil
so many times people bend their thoughts to some optimzation criterion, and ultimately it is for naught, ot worse
Just for the record? Optimization meaning effenciy of the code?
/sot/or/
yes
I prefer to optimize in the BSD sense
ALright, I think I should just get a good hold on the language before I start thinking effincey.
Wow, I can spell…
by making things like bzero?
correct, clean, efficient (in that order)
good spelling is important for a programmer — programming is about precise expression.
I was talking about my amazing spelling of efficiency
ccameron, it’s very important that you use archaic naming conventions in your code
ccameron, for example, if you need to iterate through a list, always use the variable i to hold the increment
What are those?
Why?
ccameron, int i; for (i = 0; i strlen(“ccameron”); i++);
ccameron, otherwise your code is too readable
ccameron, I’m just messin’ with ya
i wouldn’t put a function call in the test
vorpal, puh-lease
code is a bunch of set and graph features. it can’t and shouldnt be read as language
just yanking your chain
vorpal, especially not an O(n) function, right?
well, hopefully the compile hosting would optimize that away
scrh_, I disagree… code is rather a “logical language” which is best written in the most expressive way possible
personally, I use a variable named ‘index’ to iterate.
I actually just use i for most things
what are the set and graph features of for(; { … }?
old habits die hard
bbl guys
ciao
adios
oooh, i smell a compiler question
i loved compiler class. i just hated the projects
it is too a “logic system” like a puzzle or a construction set, I guess that a spoken language can also do this, but except for keywords the wording is very unimportant
OTOH, OS class was boring, but the projects were a blast
that’s nice
scrh_, I equate it more to algebra or other forms of written math
what about physic simulation class?
I have read people’s code where functions have names that are only vaguely related to their behavior, and two functions with similar names do different things, etc
scrh_, as have I
so I learned to just used the search button and think about the lines of code
search button? what is that?
search feature in text editor
you mean like isearch
oh
i fixed it.
huhu
what is isearch?
i never took a grad physics class.
sounds like you have been destroyed by evil.
no, I use kedit
in linux
incremental search?
ed is the only real way to edit text!
what about sed?
gedit
_
sed wasn’t designed as a text editor, and isn’t very good at it.
but you can edit 1000’s of files at the same time
I would consider it a text editor
stream editor
I often use it to edit files
I suggest ‘ed’
the fact that sed can’t go backwards in the input renders it somewhat useless for editing files rather than streams.
well, not useless, since you can consider a file a stream.
it just limits it to that case
you know its funny
hey room
in ##c here and #c on efnet
theres an argument about various editors almost every day
However, I would prefer ex over ed.
please learn how to spell “there’s”.
ok
i will
thanks for the tip
kati^: It’s not surprising that in either channel there exist users who waste time on discussions with little merit.
welcome.
xystic is very good at that.
xystic, you’re just mad because you’re a sed fan and it appears sed has obviously lost this battle
I have no vested interest in any editor.
I see…
It doesn’t seem visual c likes to use strtok the way I know I’ve used it with my linux c coding… what’s the eqiv of strtok(buf, “|”)? It’s not liking strtok_s(buf, “|”);
please keep your foul paws to yourself.
please replace “not liking” with something meaningful.
#define _CRT_SECURE_NO_DEPRECATE before including any stdlib
I was hoping to find a way to avoid doing that.
use a C compiler that doesn’t reject C code.
only other way is to use their silly “secure” functions :/
I’ve not had much luck figuring that part out.
Use a C compiler.
There should be an option in project settings that disables those warnings.
yeah, by doing what phrosty suggested. =P
I’m trying to avoid doing that though.
cc -D_CRT_SECURE_NO_DEPRECATE …
there should be an option to _enable_ them. deprecating funcs by default because some developers use them stupidly is not right.
Assuming Microsoft’s compile hosting lets you define macros from the command line in this way.
Microsoft is going a little too far in pushing their TR, imho.
Yes. (/D “MACRO_IDENTIFIER” with CL.EXE)
can I view with colors one printf ? (Visual Studio) … in Borland is textcolor() the function, but in VS ?
don’t work textcolor() :
see conio.h probably.
I dont found
SetConsoleTextAttribute() – windows.h
Consult MSDN documentation to learn how to use it.
thanks man
e.g. SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_INTENSITY); – this should compile on all Windows C compilers that support the API. If anything, it is better than relying on a particular compiler vendor’s conio or similar.
xystic have you one simple example? i dont understand the help and googld :
I just gave you an example usage, above.
thanks, guys.
hehe work !
n1, thanks thanks
your lack of commitment to a specific code editor is disturbing.
vorpal, I wasn’t going to say it!
in the day, i think you would strung up!
“hello, jesus is the son of god, and emacs and vi both suck—arrghghghghgh!”
heh.
leafpad for the win!
heheh
notepad
pfft
echo and cat
text editor godwins law
your opinion has been filed under “pretend to be nice to this guy” !
uyour opinion has been filed under “pretend to be nice to this guy” !/u
i actually do like notepad, its nice. no trolling
actually, after using kdevelopfor a while, i realized that emacs is missing some stuff
only problem is the lack of syntax highlighting
vorpal, emacs… missing… stuff?!
oh, wait, you mean a text editor
jk jk
however, emacs key bindings are burned into my soul
yeah, like auto indexing of code
katya^, some consider that a problem, others an advantage
so the weird linker error i was having up there was just because of the order i was putting the library options into ld
in the manpage it says you can put them all in -( -) and it will search them multiple times but
that is apparently a syntax error, unless I was doing something wrong
did you try passing it in single quotes?
‘-( -)’
?
no
ooh, wait
you probably needed to instruct your shell not to interpret the parentheses
that probably woudn’t work
katya^: the linker searches for a symbol, and when it finds it, it is satisfied
wouldn’t, even
-_-
it say, -l specified outside of -( -) are searched only once. inside it they are searched until there are no more undefined references
katya^, are you katerina or catherine?
caitlin
mmm, i’m not sure if that is a derivative or not
my grandma is a katerina
i don’t really know t_t
katya^: you can create an indexed archive for ld: ar program.a *.o; ranlib program.a; ld -o program program.a
my linux hosting distro is a KateOS
caitlin sounds possibly indigenous
Add to favorites (0) | Email this
The girl’s name Caitlin \ca(it)-lin\ is pronounced KATE-lin. It is of Irish and Gaelic origin. English version of Caitl?n (pronounced kat-LEEN), the Irish Gaelic form of Katherine. See also Catherine.
heyyy what the heck
nautilus ruined my pretty desktop
bahhh i just want a decent filemanager i dont want gnome forcing its way onto my system
solution? ratpoison!
bah, filemanager == ls -al
im a windows person at heart
i like icons
katya^: use kde.
I also like my computer not running slow like a slug
Thunar is OK, but it pales in comparison to a decent shell.
katya^, xfce
i run afterstep
ew
jk
katya^: buy a new computer and use kde
lol
thunar is pwn
you buy me one and you’ve got a deal
and kde is terrible
katya^: you try create an indexed archive for ld ?
terrible I say
yeah I run ranlib
frankr, high five!
whats thunar?
A file manager.
ah
xplore seems ok, maybe if I tinkered with the source a little and added context menus it would be perfect.
but who has time for that
I’ve noticed that windows people often have trouble spelling simple words like “I’m”.
katya^, mc
you take issue with the way I spell?
grammar fight!
gmc (gtk mc)
I thought GMC made cars.
merely an observation.
katya^: Why does that upset you?
hahaha
because my feelings are hurt easily on the internet
spare my poor feelings please
lol
can you shed light on why you misspell simple words like “I’m”?
laziness
hmm, not contempt for everyone around you?
gmc = gkt (or gnome ?) midnight commander, file manager
Zhivago, aol dont run on linux plz halp
lol
I suggest euthenasia.
heheh
aren’t you cheery
yes.
Please learn to spell euthanasia.
Oh man, spelling and grammar fight!
This is exciting.
i wonder who will win
katya^, Chuck Norris will win, of course
katya^, frankr: There isn’t a fight. Also, I don’t care enough about correcting spelling to point out mistakes usually. (Except when the mistakes are made by people who correct others.)
hahah
hey, I enjoy ##c when I can
I believe my spelling can be atrocious at times… and I make no claims to the contrary.
the important thing is not to be intentionally incorrect — particularly if you aspire to become a programmer.
I am a programmer
it is my job
feign shock
really?
for real and for true
Haha
what languages do you know?
c, managed c++ (to an extent), unmanaged c++ (to a somewhat greater extent), some php, some vb (for maintaining silly tools my coworkers wrote years ago)
hmm, I suspect that we have different ideas of what makes a programmer.
well
different people have different ideas
my idea is that I get paid to write programs
What is your ideology of a programmer?
someone who understands what programs are.
stop trolling me now please
katya^: real programmers use C :~
And you feel, katya^ doesn’t fit this description?
by the way I also have experience with assembly for the m680×0 series microprocessors
I think that just knowing one language doesn’t really help.
I see.
well
Hey guys.
who cares
Welcome, ccameron. How is your study ?
so, what is a program?
katya^: where you used 68k processors ?
embedded
It is going magnifiscent. I am on page 118 already. Just finished learning about the switch function.
katya^: in which company ?
none, all my assembly stuff has been as a hobby :
ohh :~
i’ve been designing small computers
just got a bunch of books on hardware design, memory circuitry and started applying it
it’s kind of neat.
too bad that sort of design is going out the window now that everyone designs hardware with HDL pretty much
katya^: Have you read Fundamentals of Logic design (Roth et. al.)?
no, i may have avoided it due to cost (i don’t remember)
i invested in a big stockpile of 20 year old textbooks since they’re much much cheaper
thank goodness for fpgas.
katya^: 20 years old… i design new boards with 68k processors
cool
i really like 68k assembly
compared to x86 family assembly
the register names are less weird imo
I have to learn raw assembly for what I’m doing
katya^: 68k asm is like C
What might raw assembly be?
learning asm isn’t very hard, it’s piecing it together into something big that can be the confusing part.
writing machine language on punch cards
completely naked assembly
no macros? heh.
oh, I might need those :-/
it’s only a matter of time before the chip pimps tout that sort of stuff to the general public
fpga
fpga takes all the fun out of it ._.
You mean learn to read / understand raw assembly? Surely if you write assembly, you will use meaningful identifiers for labels, etc. ?
katya^: what is the problem with FPGAs ?
katya^: i don’t know the numbers, but… i think that at this point in time that hardware is ahead of software in capability
hi… are the pthreads from libc user level threads or kernel level?
it depends on the application.
depends on the system.
but yes, you can do faster real-time work with custom hardware
what I don’t like about fpgas? well I like designing the board logic visually for one thing which as I understand it you don’t do with fpgas
i dont know if you write HDL manually or if its generated by eda tools
FPGAs are only the first step.
we need to stop using cruddy little interpreters for everything.
katya^: transparent software for making use of multicores, or heavy coprocessor arches, is non-existent
uh, what do the design tools have to do with FPGA?
there is a “floorplanner tool” for Xilinx. you dont get to do the detailed work because 1) Xilinx is proprietary 2) computer vs. human optimization
humans can optimize better than computers, but computers are faster
well I never said I was an fpga expert
I have my opinions on it from what I know of it
even so, not many programmers are familiar or comfortable with parallel programming concepts
they will change in time im sure
katya^: see this project: http://en.wikipedia.org/wiki/Minimig, the FPGA replace lots of gatearrays, but not the loved 68k.
FPGAs are just large chunks of gates which you can configure.
you could have a visual design system for that, if you wanted to.
I know what they “are”
I have also done a little IC layout. It’s alright, but I prefer working at the HDL level
well, most programmmers aren’t real programmers.
i’ll take back the”non-existent” and substitute “not widely available”
true
so what makes a programmer a programmer?
knowledge
what makes a real programmer is understanding programs, rather than just being able to make computers do stuff.
i think it is, a programmer is one who programs
I think that in academic cases that some people do high level algorithms and also detailed description, but they usually give these to separate ppl at work
the majority of programmers just use cliches without really understanding them in order to ‘get stuff to happen’
how does the pthreads depend on the application? I mean, how do I configure my code to use kernel threads? do I have to include different headers, or is it some compilation flags?
their programming is largely frightening magic with patches of familiar territory.
I do not know much about threads. also, I fail to see the connection to one of my earlier arguments
if you say so
I don’t think that’s necessarily true
then provide reasoning.
well I don’t plan on arguing with you
pthreads is an interface, not an implementation.
then I suggest that you think until you can.
but on libc, how are they implemented?
no, I don’t plan on arguing with you
it depends.
then I suggest that you think until you could.
you don’t seem to understand that
on what?
I understand that you will avoid saying anything meaningful where possible.
so stop trying to get me to
on how libc is implemented.
how many of them would be using low-level linked list insert-in-middle and remove-from-middle with funny cases?
feh, I bet you’re real popular with your coworkers
how many of what?
katya^: A programmer is one who programs by def, but I think the issue here is the difference between an amature programmer and one who knows how to spell…
programmers who “use cliches”
I mean, the common libc that comes with gcc in every linux distro…
if they dont understand the linked lists, how can they avoid logic failures
let’s consider a carpenter and someone who assembles things they buy from ikea …
hi
amateur programmers aren’t necessarily bad
are you going to claim that these are the same?
professional programmers aren’t necessarily good
Right and no
but they’re all programmers
if not, what are the fundamental differences?
Well I can’t seem to spell amature tonite
is there a function (posix?/linux) that can return an absolute path, given a relative one?
what exactly is a “programming cliche” anyway
good practices?
I don’t think that it’s a matter of that.
I understood it as meaning that they use code because they saw it somewhere else
the tasks are fundamentally different, even though they result in superficially similar products.
the carpenter needs to understand the wood.
the ikea purchaser just needs to understand how to bolt things together.
Very true and valid points
and I’d suggest that there is no way to move from being an ikea purchaser to being a carpenter by practicing ikea purchasing.
this trolling has gone on long enough
aha. I see now that you are referring to “high level design”.
topic. change. now
I think that the same distinction is harder to observe between programmers and people who can make computers do stuff by magic.
katya^: real programmers dont program, they lost time with projects, documentation, tests, quality control, etc.
Do you mean to say the carpenter is a programmer?
No more than studying paint brushes and pallets will make you an expert painter
Rather, is analogous to.
studying paint brushes and palletes may help.
real algorithms are proven by tests, yes.
But it wont make you an experienced expert
but ikea assembly is useless for actual carpentry.
sure — I just don’t think the analogy fits well.
knowing how high level pieces must fit together is useless?
how does ikea show you that?
ikea has already decided how thye must fit together.
we aren’t arguing about ikea
you’re just doing the fitting.
in fact
we aren’t arguing
i promised
yes, you’re babbling.
aha. I see now that the Ikea user has not done much thinking about _whether_ it works
One usually gains ‘experience’ by doing, not just reading alone.
or even _how_
but… there is a kind of “real system design”
that is focused on you buy pre-made parts from ikea, and other manufacturers,
and you use specifications to verify that they are compatible
Uff
sure.
anyone that uses linux isn’t a real programmer unless they wrote the kernel
whereas if you only bought from ikea, no logic is required
what are you babbling about now?
katya^: hahaha
;D
how would you rank a guy who ordered parts from multiple vendors and pieced them together
yes. though it is often a mistake to use it.
as an assembler.
okay.. please elaborate
as opposed to a carpenter. note that they are solving a puzzle because 2 pieces can fit together, but not work with a 3rd
katya^, care to justify that claim?
no, it’s a satirical claim
on the other hand, they know less than the carpenter
I think that your use of ‘rank’ betrays a basic prejudice.
no, what they know is _different_.
you’re using system calls that you didn’t write. YOU MUST NOT BE A PROGRAMMER
LOL
oh im sorry
good. then we agree. I used ‘rank’ because I was seeing if you held such a view
Hahahaha
please forgive me
how is is possible for printf(“*%c*”); to print ** ? .. what IS the blank character?
the path you already have either works or doesn’t. just use it.
please try not to babble incoherently in the future, also.
I meant printf(“*%c*”,c) , where c is a character
there is no ‘missing character’
please tell me the function.. you assume too much
perhaps you want to print a string?
I used to know someone named “brook” who would “babble”.
if the argument’s value is ‘*’ i would expect to see **.
Im really witnesssing this… there appears to be a .. missing character
oops, you have one before — sorry, i missed that.
what operating system do you use?
if c’s value is 0 lots of terminals (and terminal emulators) will just ignore it.
macosx
run it from the shell, redirecting its output into a file
hmm, I guess I could see if there is a “/” at the beginning and add the current dir if not
ooh it could be ”, huh?
use od or less or something to see what’s actually being output
I too, think that it’s important to know hardware and assembly and the OS. however, many employers do not
Dr_Ford, for me a null character works
man this is weird
I don’t see why those are important for programmers.
yes, i sadly assume that posix/linux programmers would search their references when told such a search should not be futile.
sounds like you don’t know.. btw I did do a search
s/weird/terminal dependent/
wonderful. assumptions for everyone.
no. but it fits in with not using ‘cliches’
I don’
Check code twice; ask once
try for(i=0;i!=256;i++) printf(“%d = [%c]\n”,i,i)… you will find *lots* of blank characters
you know what? never mind.. you don’t really want to tell me, or you don’t know.. whatever
i think zhivago is free to think whatever he wants, even though his views are silly and arrogant
and we should all move onto something else
Look up realpath() .
Dr_Ford, actually, using fprintf() to a file produces only 1 asterisk with a **… so maybe not
i don’t want to tell you. i want you to learn to find things yourself. i’ll tell you that part … ”man -k path”, though you’ll have to examine multiple possibilities.
it’s ok to be inconsistent. I am several different people when I solve a problem
ha! so I changed that %c to %i , and this ‘blank character’ prints out as 0
and the devil is called “legion”
well, yeah
the character 0 is null
thanks, I didn’t know about man -k
thank you for your help
katya^: have you a page with your 68k projects ?
‘night, guys
well, I don’t expect you to be capable of holding a reasoned position.
no, I do not
I should make one though
but they aren’t too impressive yet, like I said I havn’t created any video out or anything
just like LEDs that blink when different outputs are low
nul’s were often used on ancient equipment to give them time to move the print head and so had no printed representation. modern terminals and emulators tend to just ignore them.
which isn’t too impressive I know :p
katya^: wow! leds are all that users need
hehe
well I plan on using some more interesting things in the future
hi
I need to have a cli interface.. something like “cmd:”
and then a constant display of information on top of it
ncurses
something like top display
oops programming cliche
katya^: http://marcelo.darklife.org/pics/DSC01569.JPG
darklife? sounds scary
no way of doing it using printf and scanf ?
katya^: hehehe
blah I dunno how to configure xchat to open my browser when i click on links
sigh… will have to copy and paste !
URL handles
ahhh, thanks calamari
katya^: yw
are you from microsoft?
what does it mean “nat/microsoft/x-aa24…”
microsoft hires many smart people. it’s amazing that they are not able to use that talent
nat/microsoft means that theres a microsoft NAT?
for some reason freenode wants nat/microsoft/* instead of tide*.microsoft.com — weirdos.
who knows
microsoft has a policy that says they own off-hours work.. that’s lous
lousy
how would I input the contents of a file into a program? the file consists of a 50 digit number
that’s not uncommon
that’s smart actually
they managed to buy slaves without people noticing
on the other hand, Im not going to say that someone is bad just because they work for… hmm…
smart people dont use windows!
microsoft developers use linux based hosting services to code & compile duh
^^
right, but windoze OS development is hard because their system is a mess
how do you put one file into another in c?
it used to be the case that oyu could work for M$ for ten years, and then retire comfortably
so they arent “dumb” just unwise
windows development isn’t hard
what gave you that idea?
it’s amazingly harder than on linux
the API is a mess.. agreed
hmmm not really
you seem to have made an amazing leap. are you a stunt-person by trade?
their ‘kernel’ that also contains the .net framework crap
sigh.
using a copy function
windows is not bad, and it, alongside osx, are the 2 most commercially viable oses there are
uh. no. #include
how microsoft developers use linux to code & compile hosting ?
well someone could create an ugly messy problem and then have someone else solve it, that doesnt mean the ugly problem should exist in the first place
katya^, no. ms office is not bad.. and several adobe aplications
that was a joke _3dfx
hehehe
microsoft visual studio is quite nice for development
so naturally you whine about linux too, right? ’cause it’s a friggin mess as well. however, i wish you hadn’t started an off-topic bashing instead.
i have no complains, really
are u suggesting I make an include file as part of the program? Im not sure how to use that once I have got it ..
katya^: programming is programming. if you make your wage doing it for windows, so be it. but i think you’ll find that *nix is more of a “programmer’s” OS, than the alternatives
I prefer linux. it’s an opinion. I guess I am being devil’s advocate a little
yeah becuase you ahve to be a programmer on nix to get anything done XD
it’s not really user friendly
no, you are being an annoyance in helping to fuel an o/s bashing session using baseless assertions, including some that apply to your preference.
who cares about user-friendliness when coding ?
not everyone is coding
what you want is the right too lfor the right job
Linux is hacker friendly. It’s a lot easier to get to the guts of things and fix them.
well, it seemed you wanted that.
katya^: *nix is programmer friendly
that’s my point
and the right info when you need it
that’s what you need
most users aren’t programmers
hahahaha
what do you need Visual studio for if youre not coding?
wth
surely you can use an input function if you want to read the file at run-time.
Windows tries to hide them, with the unfortunate side effect that it’s often difficult to get the training wheels off.
katya^, yes that is the definition
user != coder
coders fit into both categories
no
programmers use software as well as create it
it just never entered my mind thats all ..:p but it sounds as good as any other way I guess ..
why, in my day, all users were coders! secretaries wrote shell scripts over their lunch breaks, and they were HAPPY!
but they are not users
hehehe
Mel didn’t use what he coded..
perhaps change the file so it is plain c source already, then just compile it.
users are inherently “unable” per definition
thats why they need an operating system that thinks for them
nobody is inherently unable
orly?
why are you whining about userfriedlyness then?
I’m not
if you were able you wouldn’t
you are
however,
yeah becuase you ahve to be a programmer on nix to get anything done XD
right, exactly.
yah, whining; exactly
oh shush and let me finish
heh
“oh i have to think to get things done; stupid nix”
this is turning into a flaming duel
someone wrote a blog saying that Linux isnt fast enough for client apps / graphics. and that it’s optimized for servers. is this true?
not everyone has TIME to be writing scripts and editing configurations all day
unot everyone has TIME to be writing scripts and editing configurations all day/u
some people have other jobs to do
it started that way.
therefore
katya^, therefore what?
an operating system that doesn’t force the user to spend all their time in front of the screen,
is preferable to them
ask ##linux, perhaps they have insight.
katya^, nix forces you to spend all your time in front of the screen?
Yes, it’s true. Nobody developing Linux ever thought people would want to use it on the desktop.
never heard of such a distribution
But, hot diggidy, you could be on to something here!
katya^: what is better to control a 747 ? windows or unix ?
neither
ok.
linux is at least used in the media browser/player on planes
747 flight control isn’t a desktop or a server
a pilot
lol
_3dfx, i heard the 777 uses ADA95
but do we need to turn off security / multiuser stuff to get some things to run faster?
i have no problem operating linux, although I have a little gripe with it that its named after a guy that looks like ron jeremy
no
don’t be silly. what “security” would you turn off?
##windows
katya^, what does that have to do with you beeing a user and him beeing a programmer?
I’m a user and a programmer
katya^, and what do you even want?
##linux
stop putting me in little boxes
katya^: i’m a devil and a saint
aren’t we all
and a l337h4×0r
hehe
##windows unless ya’ll can drag this back to something resembling programming in c.
katya^, you disqualified yourself as a user when you whined about how bad it is that you need to think to use an operating system
that is probably not saying what i meant it to
no I’m just a little more reasonable in my expectations of what a user needs
programming C on linux host is so much more fun than on windows !
there
but you get the point i take it (if you think)
no diea why katya^ would bring users into this
because users operate software that we write
katya^, i thought you didn’t write software?
we write software so that it can be sold, to users
katya^: btw, militants exist in every crowd
who then use it
katya^, WRONG!
one aspect, accomodating users when writing your program in c seems usefully topical.
nopealicious, I write software
so you thought wrong
sadly we’ve not quite any of that so far.
but we should be talking about the stage where we are developing, not at the user levell
katya^, have you actually looked into the philosophy of freenode?
katya^: well, that’s more than nope does, so ther
we write software so that it can be sold, to users
i haven’t paid a cent for software in years
users are why we write software, even if the user is another programmer writing a program.
and i am not going to because oyu tell me to
I’m not asking you to
but I don’t think #c is for communism
you are implying it tho; which is just wrong
Freenode has nothing against developers who choose to sell their software.
katya^, there is more than capitalism and communism
katya^, stop thinking in boxes
it’s people like you that give us a bad rep
yeah
too bad
settle down
/msg
katya^: i suppose #c might be, but ##c certainly isn’t.
#c is for trannietalk, I thought everyone knew that
efnet’s #c, yes.
katya^: Also, for spelling corrections.
xystic, it has nothing against them; but it has not been created to “only” support those
freenode’s #c isn’t for any discussions.
C is for Cookie!
no, that’s efnet too.
anything non C-language related is efnet
cookie cookie cookie rhymes with C
katya^, http://freenode.net/philosophy.shtml
katya^, a href=”http://freenode.net/philosophy.shtml”http://freenode.net/philosophy.shtml/a
computer godwins law
I’m done talking about that
me too
I know.. you started it and then ran out
at least here
Referring to Godwin’s Law is not an invocation of it.
im sure you’re familiar with stallmans ‘free speech, not free beer’
katya^, free speech might aply somewhere else; but certainly not here
apply*
I’ve never been interested enough to listen to what Stallman had to say.
lol xystic
lol
Haha.
http://www.softpanorama.org/People/Stallman/Images/saintignucius.jpg
lmao^^
it is the right hand^^
he is quite ugly isn’t he
indeed
stallman is a smart bastard. he just doesn’t have much in the way of personal skills. and, how many people here do?
what the hell
i think we should move this to some other place
twkm is probably already boiling and considering some bans or similar
or just drop it and talk about something more interesting
sure, now that it is dying down move it.
like C
http://www.macrocats.com
^— for your enjoyment
…
at least lolcat has something to do with codes
let’s talk about C
although it’s not anywhere related to C
katya^, http://www.macrocats.com/images/uploads/mc10586.jpg
Let’s talk about C baby, let’s talk about malloc() and free()
#include malloc.h
while(malloc(1024)) printf(“not dead yet”);
free() as in speech
lol, I hope the kitten in the cup is fake
you twit, there is no malloc.h in C
theres a kitten in a blender one
i thought it was quite distasteful.
right vorpal
vorpal, man malloc then
wth.. that link always redirect me to http://www.mozilla.com/en-US/firefox/central/
ne too
me too
- from man malloc
sounds like the owner hates ie or opera or whatever it is you are using.
but he would want to redirect to ms or opera if that’s the case
nah it works on ie7 for me at work
let’s see what wget says
as in … he thinks you should use ff, or perhaps merely a newer ff, or stop using a proxy, or …
vorpal, http://gsd.di.uminho.pt/members/vff/docencia/so1-2004/malloc/malloc.h
vorpal, a href=”http://gsd.di.uminho.pt/members/vff/docencia/so1-2004/malloc/malloc.h”http://gsd.di.uminho.pt/members/vff/docencia/so1-2004/malloc/malloc.h/a
who knows what idiots think.
or he is a user who doesn’t know what he’s doing
for some other channel it might be interesting to note if he used content negotiation to determine the en-US, or if he’s just a git.
http://www.xs4all.nl/~borkhuis/vxworks/ftp/vxhacks/pso_stack/include/malloc.h
Netbsd malloc.h^^^
what is that link supposed to prove?
go tell your mom there is no malloc.h vorpal
as long as ic an use it with gcc to get rid of the need for casts i will do so
you must be an MIS student
nopealicious
wtf
even wget failed
heh.
speaking of cats what the hell is mine doing
lame.. I knew it from the beginning
have wget lie about the user agent.
makin more noise than the calgary stampede
katya^, please
strong opinions, no real technical expertise, yep… you fit the bill, my friend
this is ##c not #ilovemycat
prove it
vorpal, good; but stop pretending like i care
3 cgd Exp
#include stdlib.h
you may fare better in a channel where people are impressed
for you telling me it does not exist, it has been there for quite a long time, no?
malloc.h is not in ANSI
http://www.cygwin.com/ml/cygwin/1998-01/msg00014.html
gamm, did i ever imply that?
explains why there’s a malloc.h
omg a cygwin url; now you made me laugh
gamm, and also explains why they added it to the newest release
don’t omg me.. omg the author of whatever you linked us to earlier… he probably referred to that cygwin url
heh heh
haha gamm
Boring.
kinda, yes
“it does not exist” is an odd saying tho
i would agree to “it is not neccessarily needed” tho
-c
malloc.h isn’t part of standard C
anymore than wsiorjweiorjweoij.h is
never denied that
malloc.h not exists in any system (in solaris, for ex.)
but i do get problems when i don’t inlcude it on linux, so i will continue to do so..
_3dfx, wrong
nihil@nihil-gw ~/c $ ls -al /usr/include/malloc.h
-rw-r–r– 1 root root 7661 Dec 9 2006 /usr/include/malloc.h
you should include stdlib.h instead
go celebrate.. you just proven that a whatevernamehere.h exist
it exists somewhere, and may even be provided by the implementation. but code that uses it would not be strictly conforming, hence would have portability issues.
nihil@nihil-gw ~/c $ uname -a
6 Local time zone must be set–see zic i686 Pentium II (Klamath) GenuineIntel
just to be sure, ya?
twkm, then why does gcc still let me compile it with -ansi -pedantic flags when i inlcude it?
gcc must be wrong
http://www.gratisoft.us/pipermail/sudo-users/2006-July/002912.html
and when malloc.h includes stdlib.h and nothing else.. shouldn’t you get smart and include stdlib directly ?
gah
who cares
- -;
checking malloc.h usability… no
portability is somewhat of a myth anyway, there are teeny differences between most platforms claiming to be compliant
katya^, non-users obviously do; why else would they still be responding?
_3dfx, so what does that prove?
still waiting for an answer on the “why gcc lets me….” one
cause gcc is made by humans
http://mail.easysoft.com/pipermail/unixodbc-support/2006-January/000857.html – no malloc.h in hpux.
why does it fail here?
twkm, i don’t know
http://gee.cs.oswego.edu/pub/misc/malloc.h
http://nms.lcs.mit.edu/software/snoop/snoopsrc/sys/malloc.h
http://www.sfc.wide.ad.jp/~asaeda/igmpv3/src/kernel/sys/malloc.h.orig
telling me it doesn’t exist, huh?
if you use a conforming implementation and i use a conforming implementation and you wrote strictly conforming code it is required to compile (at least) on both, yet it does not.
then why does gcc let me?
*yawn*
it’s still valid
darn hipocracy
What does this malloc.h contain?
what does gcc has anything to do with stdlib ?
because gcc doesn’t care about the names of the headers you use, it only cares about the contents.
draichis, look for yourself
yo
its about 100-200 lines
twkm, good we cleared that up
but of course you didn’t write strictly conforming code since you used a non-standard header to obtain a declaration for malloc.
Odd.. on os x, I have a malloc.h that has about three lines.
draichis, then look at any of the above links
hi friends
hi jo
and please leave me alone with your rantings
go complain to the authors of malloc.h
* Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved.
hi katya^
that would be them^^
#ifndef _SYS_MALLOC_H_
#define _SYS_MALLOC_H_ and #endif/* _SYS_MALLOC_H_ */
1987; haha, doesn’t exist, huh?
what’s up katya^
draichis, great; OSX is the definite standard for EVERYTHING
“@(#)malloc.h8.5 (Berkeley) 5/3/95″
I said this?
You’re being pretty hostile. You should calm down.
You may have an accident.
including malloc.h is depriciated on FreeBSD.
http://bugzilla.gnome.org/show_bug.cgi?id=391195
draichis, he is always like that
malloc.h is a *bug*
_3dfx, that of course mean it does not exist, i know
hipocracy is fun
not much jo
you?
i never said it was standard
please read
i merely used it in a stupid joke
now go whine at someone else please
ok.
thanks
:/
no.. you go repeat that stupid lame joke somewhere else
horrible as it was, at least it was all mostly about c.
haha
twkm, i didn’t wanna start it
ah, stupid hour has come early today.
you twit, there is no malloc.h in C
all i was responding to actually
vorpal is correct.
right, so gcc is not a C compiler
(will not back down)
nothing like nitpicking a possibly vague statement
nopealicious uses malloc.h and gets() :~
ops
did i not say whine at someone else?
not my fault it has been implemented; never implied it was standard; all your assumptions
*yawn*
your logic is backward.
Zhivago, and no; strictly speaking he was not right
You should stop.
a cat is an animal, animals are not all cats.
if he had said “there is no malloc.h in standard C” i would’ve agreed
you have confused ‘an implementation of C’ with ‘C’.
please think.
“did i not say whine at someone else?” — sorry tards are not allowed to say this
so if a C compiler provides “nopealicious_is_a_moron.h”, and someone said “there is no nopealicious_is_a_moron.h in C”, you’d disagree?
but calling me a twit because of his assumptions makes him deserve a hammer to the head imho
a frenchman’s a man. a frenchman ain’t a cat. so why don’t he _talk_ like a man?
what if it is not a sorry tard?
Chris, /ig chris 3600
you don’t even get that smart joke
you have made a basic category error.
like?
that an implementation of C is not C?
bye nope
yes.
try not to make that error again.
gamm, /ig gamm 3600 bye
lmao
whatever
at least I didn’t have to announce my ignore attempt to the whole world
good point
that’s better
thanks
Hi.
hey
hi, radioman_. lithuania?
hi vorpal
slt
shift left
of course, it could be a code greeting
salute ?
plausuble
but much less giggling.
wow, this coffee tastes like chinese chicken and mushroom
try not straining the leaves through a chicken.
there’s slti
I dont know how to say that with a straight face
or is that steep. hmm. no, that’d be “in a chicken”, i think.
slt has problems already, for english speakers. as do clt and cnt, and some other c variables i’ve seen.
cnt lol
you cnt !
for (cnt = 0; … when you’ve gotten past puberty it easy enough to read, but until then …
err, is easy enough to read.
coffee isn’t in leaves
that’s tea
coffee is in beans
at least push & pop are clearly defined
one of the best hosting smells in the world is roasting coffee beans
I’d suggest ‘ash’ for ‘arithmetic shift’
one of the worst smells in the world is fermenting coffee beans
lol
all i know is this is medium roast and it’s a different taste to what i’m used to
haven’t experienced it
then again, i usually drink instant coffee
I don’t know that I have smelled it. I have smelled rotting coffee grounds
which loses all flavour after its opened
I have seen coffee with mold *runs away*
ugh
not unusual
it’s worth it, grinding your own coffee beans
at least if you did keep the beans in an air-tight container
Hah.
unlikely.
wasn’t coffee from africa
the reason that you wonder is probably because tea in america tends to be horrible.
the middle east, iirc.
http://en.wikipedia.org/wiki/Coffee nope, i remembered correct
i’ve had “good” tea. i just think coffee is better
how do you know that you’ve had good tea?
i drink both, coffee and tea
it said so on the box
i prefer coffee to tea too
l-)
though i quite like chinese tea
and also cacao
i think i’d drink even urine, if it was served steaming hot in a nice cup
im the best in the world period
afaik, it was first cultivated in yemen, but it doesn’t matter — it preceeds the americas considerably.
the secret with tea is to have good leaf and not to boil the water.
lol tea
lolol
only nerds drink tea
what do cool people like you drink, busted?
well, i’ve never made tea directly from leaves
chris, potcoke
hmm, what do you use? teabags?
yes
teabags tend to contain low grade chaff
stamped made in china, so it must be good!
chris, marijuana mixed with coke
busted, that sounds like a waste of perfectly good marijuana
if you have an opportunity try it brewed from fine dried leaf, and without the water coming quite to boil.
you would do better to form a tincture in alcohol.
Chris, my favorite is a screwdriver though, vodka+orange juice
the problem with boiling is that it deoxygenates the water
Zhivago, are you russian or sumtin?
please learn how to spell “something”.
its just the way i roll
s/ro/tro/
bust3d was raised in the ghettos by the sounds of things
and lol twkm
ghettos lol, my familys rich
he is still technically a human being.
unlike u!
rofl!! i’m not even gonna get into a money debate
please learn how to spell “you”.
so i take it you talk like a retard because you think it makes you look cool?
he was probably raised by sewer rats.
or worse, he’s a white guy that thinks he’s black
probably listens to gangster rap without being able to appreciate the lyrics lol
hahahahaha
no, wait, he listens to hip hop
it’s all the rage these days. so much ice goin’ to da hood, gotta get sum uh dat.
gangster rap is too real
it is a pity when white people aspire to be what they cannot.
it’s a pity white people seem to aspire to get shot or something
im so cool no one can match me. all chicks like me
dude, i don’t want to hear about your bird fetish
geez yet another one
where do these idiots crawl out from ?
america.
“da hood!”
rofl
busted, is that why you’re busy trying to tell a load of strangers on the internet how good you are?
lmao
i can cheat on any chick i wan
)
wow, you legend…
aye. they are having competition who can drink the most while chatting on irc
Zhivago, health care is a bit of a problem here in the states.
“wan” is not a verb.
Wow.
just got back from moore’s new film, heh.
WANT
aussie gangstas are especially funny to watch.
Shouting is prohibited in this channel.
err, s/^/white /
so
I can’t get allegro libs to compile hosting in win32
sounds sad.
please do not shout.
because the idiots who made the official branch decided to make programmers use seperate compilers to build them instead of MSVC++
draichis, what ya gonna do
hey
good
as in cl?
yeah
well i mean
cl is msvc++
you sound sooooo tough rofl
like when I compiled SDL, it came with a project file specifically for MSVC++
i take it you mean “no project file” so you can just stab f5?
yep
make one.
I thought that
i could examine the make file
msvc++
or makefile rather
have you seen http://wiki.allegro.cc/MSVC_Project_Files yet?
i didn’t even know they had a wiki
also http://www.allegro.cc/docs/windows-msvc-use.html
did bust3d “h4xx0rz ur c0mpz0rz”?
and wb
thx twkm
sure.
use of cast expressions as lvalues is deprecated
moin
*(((uint16_t*) buf_ptr)++) = timer1_overflow;
Is the right way to go using another line for advancing the pointer position?
it certainly eliminates the extreme ugliness.
i prefer a temporary of the desired type.
I have a byte array and I want to save 16bit words and 8bit words .. That’s why I’m using the cast.
horrific.
memcpy.
though even that’s fairly horrid.
It’s only a small microcontroller program. Hmm. I could use two buffers, one for the characters and one for the 16bit words..
and your compiler has no ability to optimize memcpy?
it most certainly can.
have you no alignment worries? even if not now, will you never port to another platform that might? if so the non-memcpy way will break.
I’ll try. No, I don’t want to port. But thanks! I’ll just have look at the assembler output to see wether it differs. I didn’t knew that C compilers to optimize memcpy
Hmm.
hmm.
Hmm, indeed.
ws 4
oops
night all
hi folks
solve a problem
no problems forthcoming
too bad, i had this cute 18yrld hostage
world peace? elimnate hunger? common, guys, it is so forrrmulaic
hi folks
vorpal peace & serenity “_^
SportChick hi
you are definitely in the running
hifolks
..’\/’.
|
|
|
wtf
hi
hi psypointer
why does malloc allocate more space than i want? int* iptr = malloc(sizeof(int)); *i = 1; i++; *i = 2; works, segfault comes hundrets of bytes later..
because the kernel is being smart
just vor performance reasonsß
physically allocating memory is a very expensive operation
is there any way to use a “safe malloc” which only allocates the bytes i want?
no
why would you want that?
i think this could be very useful during development to avoid buffer overflows …
use electricfence or so, if you want to avoid buffer overruns
or valgrind
hm okay, thank you ifvoid
and as long as there is writable memory adjacent to your allocated block, it’ll keep going. You’ll just wipe everything out until some memory access error occurs or you crush your program.
hello. stupid question: is there some kind of “else if” in the preprocessor? i.e., a composition of “#else #ifdef”? i found #elif, but thats not what i am searching for i think
why do you need this schoppenhauer ?
i have a conditional code: #ifdef BLA1 … #else #ifdef BLA2 … #endif #endif and this is not looking good
(insert newlines ^^)
ah okay..
#elif defined(BLA2)
is this standard? will this work with gcc and vc?
ys
yes
it’s ansi C
uh
K&R even
hm. so i could also write #if defined(BLA) … #elif defined(BLA2) … #endif (which would look more consistent) ?
yes
ok. thank you.
hi. am i forced to name the structures i make? can i just write struct { int x; int y;}; ?
you can write struct { int x; int y; } foo;
You can, in some cases.
let’s assume i don’t write the name of the struct. how can i make a fucntion return a struct like that i just made?
That’s the point.
oh, so i get much more options out of that
i think i got it
typedef struct { int x; int y; } my_t; my_t blah; my_t func() { …}
why have i to cast a structpointer if i want to access membervariables of the struct ((struct foo)*n).x = 1; ? (i know that n-x works, but i want to know why there is the cast in the long form)
s/have i/do i have/
if i only say struct foo; what am i exactly saying? that foo is an empty structure?
it’s a forward declaration
you don’t need the cast
you can use it to declare pointers of type struct foo
oh damn
i see, (*n).x works
thanks..
*grml*
that’s because they’re the same
i don’t understand
i just forgot that i need the
forward declaration?
and tried some spooky things like casts (and that worked)
thank you and bye
peligroso, it just tells the compiler that there’s a symbol of name foo, of type struct and that it’s completely declared somewhere else.
read your book.
how to access ‘raw’ keyboard through some device in linux directly?
One doesn’t.
?
What don’t you understand?
you answer
your
Let’s rephrase it then.
could you elaborate it a little bit more please?
Why the hell do you want to access the ‘raw’ keyboard, assuming it even exists?
yes
I’d to see events from it
Events?
C has no notion of that. You could try #linux or #kernelnewbies or so.
Seconded, I could’ve sworn he was asking how to poll the device, though.
*shrug*
yes
exactly – but i’d like to know the source dev for it
hi, is there any function like strtotime(“last Friday”) in c?
no
no magic functions.
so i have manipulate with the stuct time.. *ouch*.. ok.. thanks
You have no idea how difficult it would be to implement such a function.
it would be fun…try and make it c_newbie…
What a retard(!)
strtotime(“when all retards disappear”)
well, i guess i have to tho..
INF
it’s not *that* difficult
get time_t
get current day
and subtract 86400*number of days to last fri
well.. assuming strtotime only does that
You could take cvs code as a reference. You can specify date formats that way.
otherwise, you would need an AI to understand that sentence
indeed
what if it’s close to midnight and there’s a DST change between now and last Friday?
what timezone?
what about leap days
that too
DST crap
etc.
hey I use Islaam timezone.
oh, and which calendar
your problem
Allah would be proud of me
why “would” ?
is he dead?
no.. because unfortunately I was joking
or is he not omnipresent and omnipotent and omniscient as everyone pictures their own god?
ah
too bad
zvrba, you spoled the fun…
i*
i tend to do that
you spoiled your you-spoiled-it statement
and subtract 86400*number of days to last fri — in a month?
heh..
:/
can you ask a comprehensible question?
ah
last refers to whatever it refers to in your example
sorry, coz i read ; int tm_wday; /* days since Sunday [0,6]
orang gila
what it your actual problem?
orangutan!
you are actually implementing it
manyak siol la org ni
i’m implementing orangutan?
jangan cakap
huh? indonesian?
oh, malay
tak boleh ka ?
hey I found someone from my country
or a neighboring country
siapa?
im indon
lu la.. haiya
I know, that’s why I started babbling in malay
haha ok.. I’ll stop here
you found someone who happens to speak an understandable language
but that’s relative
(to you)
language does not imply habitat
indeed
ie. country of residence
is it Chris corebsd?
but it implies origin..
c_newbie_ no
no
no it doesn’t
or something too abstract to describe but related to origin
at least
no
*goes
haha
australians learn indonesian at school sometimes, i hear
counterexample: teachers
I do live in Kuala Lumpur, though
I used local dialect
bloody solaris does not always deliver signals on the alternate stack
bah :
so only he or somebody who had been there for at least 10 years will understand
how inconvenient
indeed. but i think it only happens in conjunction with threads
and i’m unable to reproduce a simple test-case
ghastly
where do you live?
yeah
anyway
i’m off for a bike-ride
good idea
see ya
Chris, somewhere near KL
farewell
on the outskirt
gamm, okay
what do you do for living ?
aargh.. i wish there’s strtotime
c_newbie, php
make software
yea i know
Chris, local company ?
i was trying to convert this php application into c
posix gives strptime
gamm, international company
ahh seen
thanks chris, im reading it now
I was wondering.. not many Malaysian programmers hang out in IRC
yeah, I’m not Malaysian
gamm” ohh yaaa
oh..
ok
I assumed again
Where do you came from??
really going for dinner now.. later
england a long time ago
enjoy, gamm