« first day (153 days earlier)      last day (32 days later) » 

JTA
1:31 AM
Wow. 13 days...
 
2:16 AM
having a hard time using screen (unix) command. "Ctrl-a w" <-- this literally means what? press and hold control, then press and hold 'a' then press 'w' ?
"Ctrl-a ?" literally means: press and hold control, then press 'a', then press and hold shift , then press the '?/' key ?
 
HI super. it's about time this site got a C room. All I ever see is the C++ room.
wait... nevermind. I see that there's been no activity in here for 13 days. :(. bye
 
user50049
2:38 AM
There's been several attempts at getting an active C room going, I think in order for it to happen a few of us need to be here (and somewhat paying attention) over the course of a week.
 
4:14 AM
@Tim Well, I'm a questioner, not a helper (at this point). But I'll stay in here at least while I'm trying to figure this out. Maybe it'll help.
 
user50049
5:12 AM
@Jeff Talking code is fun, but it's the casual shenanigans that tend to keep a chat community vibrant and active (at least from what I've seen)
 
@Tim no doubt about that.
! look, two people in here, talking! :D
 
Holy crap!
Ahh now 3!
 
what should we talk about?
 
I'm new to C. I just learned how to pass a pointer to a function that returns a pointer to another function that returns an int. I think it goes something like:
void(* void * () ** void ** void * ())(()(( ***) ** )(( void)
 
well, i'm new to C and i can't parse that for nothing
 
5:16 AM
oh well this is what you have to look forward to
learn C if you want to gain an even greater appreciation for perl
 
i don't know perl either. i'm studying math. i only have to do C for my thesis :D
 
 
9 hours later…
user50049
2:43 PM
All of this stuff I have to do with PHP has inspired me to consider a gravatar change
 
user50049
 
2:58 PM
@tim i think the new gravatar will go over well. very representative of a coder! :D
 
user50049
@Jeff I thought so! But the hammer is pointed in the wrong direction.
 
haha! :D
i guess you don't like PHP? @tim
 
user50049
I have a love-hate relationship with it. Mostly I hate PHP that other people wrote (especially five years ago)
 
user50049
The whole concept of 'type juggling' reminds me of a baby with a full tummy and no diaper, but .. yeah, it gets things done.
 
haha. i think i know what you mean. but in my case, i hate my own code that was written long times ago, too. i find i forget what i was thinking :D
can you explain 'type juggling'?
 
user50049
3:08 PM
@Jeff PHP expects basically everything to be a string initially
 
user50049
So to convert a string I know is the string representation of a float, I can simply $float = (float) $float
 
user50049
Which doe not make a sound if anything went wrong
 
user50049
(e.g if the string representation of a float had characters that could not be converted)
 
user50049
So they offer functions on top of that
 
user50049
3:11 PM
It's like they re-invented atoi() and called it a feature.
 
user50049
Don't get me started on (binary)
 
@Tim well, every language has to have a type conversion feature(s). no?
hi @Jaakko. Welcome to the underutilized C Lounge
 
user50049
@Jeff Yes, but casts that don't give even a hint of a warning .. ummm....
 
@Jeff Hi! I was wondering how much a mathematician should study programming to get a job?
 
i've gotten warnings during compile. but yeah, sometimes the code just runs wrong and you can't figure out why.
 
user50049
3:15 PM
Type safe callbacks in C are difficult, as you're going from void * to the type you're actually expecting.
 
@jaakko good question. personally, i think there are more programming jobs than mathematician jobs. and i'm looking, myself, for a math programming job. i understand that the finance sector (at least near me) has large needs for math programming types (e.g., Matlab)
 
user50049
So C hands you a loaded gun. PHP hands you an ICBM, a few dozen NAPALM containers, a few knives and a blowgun just to be safe. (I'm working on a billing app)
 
@Tim i see. well, i'm not a fan of void *, either. i can't see use gdb to see the data.
 
@Jeff Matlab is good but it is so expensive so I was wondering if it would be cheaper way to learn C first.
 
@jaakko, learn C first, it's cheaper. there is a student version of Matlab for about $100 (that's US dollars - i don't know where you're from).
@jaakko you're from Finlan! :D Look into Octave, which is a free version of Matlab, too.
...but i don't like Octave. the interface was too time consuming to learn.
 
user50049
3:20 PM
Knowing C will never be a bad thing for you.
 
...but Octave is the right price - free.
@jaakko i have to agree with @Tim's last statement, too.
 
user50049
Most languages you'll encounter later are written in C. Well, if not most, many
 
user50049
I think Matlab has some kind of student program (as in next to free)
 
I'm From Finland. I have the book "C Primer Plus". Is it enough to study it well to get some jobs or do I have to learn for example GBD, version controlling etc.?
I try to look Octave.
 
@Jaakko Learning the core C language should be enough to get an entry level job. Version control will be different at every job, anyway. I don't know what GBD is. If you mean gdb (the gnu debugger), I would say getting some experience with gdb is very useful.
 
user50049
3:25 PM
@JaakkoSeppälä I'm not familiar with that book. For a job it depends on what you like doing. If your interest is in say .. static analysis of other code, and you have working code that does that well then yes, you could get a job. Version control is mandatory, you need to know git / mercurial / svn (those are the major ones), companies that use things like BitKeeper or even Bazaar realize that there will be a learning curve.
 
@Jeff oh, I meant gdb. Sorry.
 
@jaakko Concentrate on C language, get some experience using gdb along the way (or try an IDE like Eclipse, which is also reasonably priced). Look into Octave. That's my suggestion.
 
user50049
The first thing that happens is you realize that I want to be a programmer, then you work, study and get better at doing it. Quickly after that you realize I like doing this (type of problem solving) most, that's when you find your calling. You need both to apply for a job that you'll love.
 
@Tim do you know Linux? the scp command?
 
user50049
@Jeff Yes, a bit
 
3:28 PM
okay, thanks for both! Yes, I like problem solving but there are so few open positions in Finland that I should study something more
 
ok. well, i think my question is more about file specifications, anyway. ...
 
user50049
@JaakkoSeppälä What kinds of problems do you like to solve?
 
I studied algebra and algebraic geometry. Just anything where one can learn rigorous ways to do things.
 
I made a backup directory of some important files. The directory is on cluster, in the directory $HOME/subdir/FPU.bak.20120902. i want to copy the whole directory, and it's files, to a diff computer, called `passthru'. i tried...
 
user50049
Be aware that -R in cp is -r in SCP
 
3:33 PM
$ scp cluster.schoolname.edu:subdir/FPU.bak.20120902 . and i tried scp cluster.schoolname.edu:subdir/FPU.bak.20120902/ . (added a trailing slash). both times i got the error message: scp: subdir/FPU.bak.20120902: not a regular file
 
user50049
Permissions? Perhaps the remote file is a symlink?
 
nope, not permissions. remote file is not a symlink (I just made that directory 5 min. ago). i don't think i need -r, i just want to copy the one directory and it's files.
 
user50049
Back in a few, I have to head to the ATM before it gets too late
 
user50049
Paypal delights in just picking some random day of the week to do stuff.
 
@Tim haha. i only started with paypal recently. i like it.
it's so convenient.
 
user50049
3:37 PM
@Jeff It's convenient, yes .. their bank transfer schedule and currency conversion is somewhat whacked.
 
it takes them a few days. what country are you in, @Tim? Is it the same laws as in the US (where I am).
@Jaakko maybe also try hanging out in math chat room and ask. they're usually pretty friendly over there: chat.stackexchange.com/rooms/36/mathematics
 
@Jeff I have been there but I don't know how it would help me to get a job. But I have got some pretty good ideas to some of my math problems.
 
@jaakko go there to ask what they think is useful (programming in C, math, other) for getting a job. the question you asked us. there's more of them there and they're pretty friendly (at least to me).
 
@Jeff ah, ok.
 
3:54 PM
@JaakkoSeppälä @jaa i see they're in another discussion and didn't help you much, huh? :( maybe try again another day. ask the question more like you originally asked us.
 
@Jeff Okay. I try that some other day.
 
user50049
4:06 PM
@JaakkoSeppälä Have you blogged these ideas? or published them somewhere where they can be explained instead of paraphrased?
 
user50049
@JaakkoSeppälä In chat, you are quite limited .. probably better to publish for later reference.
 
user50049
In this universe, one thing is for sure, math makes sense to everyone.
 
@Tim I must agree with you, again (you are wise beyond my years :D ).
With math, you can do anything (engineer, programmer, actuary, probably a ton of other things, too). With an engineering degree, you can do engineering.
math also teaches you to think straight!
 
user50049
Math is something I'm learning now that school isn't in my way anymore.
 
user50049
There are some that say programmers don't need strong maths, but consider this: Write a bin packing algorithm in o(log N) that can examine virtual machines on thousands of servers and migrate them around for best density. Additionally, the requirements of each server can change while being migrated.
 
user50049
4:15 PM
Where o(log N) is the minimal acceptable performance.
 
user50049
That took a year of my life.
 
user50049
And ironically never was used. By the time I finished it they just resold amazon.
 
user50049
The kicker was, amazon contacted me via careers a week later.
 
@Tim well, that's pretty cool. Amazon is probably a good place to work. And they will be around for a long time, I bet (not like some other silicon valley names).
 
user50049
I finished it in O(n1) time, and told Amazon to go to hell.
 
4:20 PM
@TimPost @Tim I almost have a graduate math degree (I completed my courses, just working on my thesis) and I only kinda understood what you said, anyway.
what is "bin packing" algo? What is N?
 
user50049
Google 'bin packing' and 'big o notation'
 
I understand 'big o notation' (a bit). what i really want to know is what is N wrt a 'bin packing' program?
 
user50049
Big O simply describes the worst case space time complexity of an algorithm. Presumably, everything is fast with small data sets to chew on, but feed it millions to analyze, how slow would it be?
 
user50049
Bin packing is a common programming problem, one second:
 
user50049
In computational complexity theory, the bin packing problem is a combinatorial NP-hard problem. In it, objects of different volumes must be packed into a finite number of bins of capacity V in a way that minimizes the number of bins used. There are many variations of this problem, such as 2D packing, linear packing, packing by weight, packing by cost, and so on. They have many applications, such as filling up containers, loading trucks with weight capacity, creating file backup in removable media and technology mapping in Field-programmable gate array semiconductor chip design. The bin pa...
 
4:23 PM
oh. it looks like (from Wikipedia) bin packing is Combinatorial type solution.
how did you make that link? nice feature.
 
user50049
Bin packing is easy if the stuff you throw in them does not gather 'mass' a few seconds later.
 
user50049
Chat 'one boxes' links from Wikipedia, just paste the link. Or paste the link from (nearly) everything on any Stack Exchange site.
 
user50049
 
user50049
That was just a link to your profile
 
user50049
I solved it through a series of likely_*() functions so I did not throw a golf ball that would shortly become a basketball into the wrong bin.
 
user50049
4:29 PM
re-scanning the bins on every decision was just .. muck. Lesson learned, there is no such thing as 100% efficiency when tossing crap that can change into bins in order to achieve a best fit every few minutes.
 
it sounds like a doozy of a problem. was that written for school? work? what was the ultimate use of the app?
 
user50049
And where my likely function was dubious, I kicked off another thread to put that specific VM back in to the queue to be rebalanced.
 
user50049
@Jeff It was a cloud. A thousand + servers each hosting 200+ virtual machines that were granted additional RAM and CPU slices on demand.
 
user50049
and I had to achieve best density so idle servers could be powered down
 
user50049
(or up)
 
4:32 PM
holy cow! are you kidding. and you had to write that by yourself!
do you have a math degree, too? how did you know how it would balance?
what language did you write it in? (i'm really impressed - that was a heck of a task)
 
user50049
So I had to examine each VM's memory usage and score it, and then score (based on other data) that the VM would either grow or shrink (using a signed integer), and that's how they got sorted.
 
user50049
I wrote it in C.
 
user50049
The platform was Xen
 
so when you say you had to rebalance, does that mean you had to take a process off of a VM and move it to another? how do you do that?
Never heard of Xen. en.wikipedia.org/wiki/Xen. Does it have it's own scripting language? Did you have to somehow hook into Xen from C?
 
user50049
@Jeff I had to figure out what each VM was going to need or not need and then migrate them around so those expected needs could be met
 
user50049
4:36 PM
While dealing with a blocking API to make that happen (the migration)
 
I have Oracle's VirtualBox installed on my machine. That must be similar to Xen.
 
user50049
Anyway, the point is, don't listen to anyone that says maths aren't really a part of real programming. They probably just write web apps.
 
user50049
Very similar.
 
sheesh. i'm trying to program an MPI application which must be nothing compared to what you did.
 
user50049
OpenMPI?
 
4:38 PM
@TimPost Well, that's a good point! You needed a lot of math for that problem, huh? :D
 
user50049
I needed a lot of math to realize that I did not need a lot of math to solve the problem, yes.
 
MPICH version 1.2.7. Is similar to OpenMPI (I'm told)
 
user50049
Never used that
 
@Tim haha. sometimes in math you can really simplify things. but you have to know the math to do that.
did you use OpenMPI?
 
user50049
I did. I don't use it much now.
 
4:41 PM
oh. i'm also using a specialized library called CVODE. It is for solving math problems called "differential equations".
 
user50049
But I seldom run across a use for OpenMPI these days. I mostly just make crap that doesn't work ... work.
 
haha. it's easier to debug another's code than to write your own. i probably need to learn somewhere how to design programs
@Tim your profile says you live in Philipinnes but telecommute to work for a company in British Columbia (in Canada?). That's a long telecommute! Do you never have to go to the office?
 
user50049
Umm, it's typically easier to write your own. But time constraints and all. Once in a while you run into gold that just needs some love. More often than not you run into crap you just inherited with a long expired budget.
 
user50049
@Jeff Not yet, but probably at the end of the year. Current thinking is since we have awesome beaches and stuff, they'll come here.
 
@Tim i've been there. i think i'm just not very good at designing overall programs. IOW, I can code ok (given specs), but I need to learn to design the overall program structure better.
@Tim yeah, but don't you want to see another part of the world? Go to BC (just go in the summer)!
 
user50049
4:47 PM
@Jeff That comes with failure, and it won't stick without failure.
 
user50049
@Jeff I'm a US expat, I've been a lot of places (I had to get pages added to my passport)
 
How does someone way out in the Pacific get a job for a company in Canada?
oh. may i ask why live in the philippines?
 
user50049
@Jeff I have a bit of a following in the hosting industry. I've been in it for a very long time.
 
user50049
@Jeff Because it's more fun in The Philippines :) I am going island hopping in October. And well my modest salary pays for highly accredited Montessori schools for my kid.
 
@TimPost oh. a good rep will go a long way (as you clearly demonstrate). :D
@Tim Nice! How's the climate there? I mean year round? It never gets too cold, right?
 
user50049
4:51 PM
@Jeff It's also my fascination with cultural anthropology. On the one hand you have the US, on the other you have (most of the rest of the world)
 
user50049
@Jeff We do have monsoons, quite a few and yes it does get cold here. Never to the point of snow, but sometimes frost. From Manila I can go anywhere else in Asia cheaply, which I do at every available opportunity.
 
user50049
For the most part it is hot, either dry hot or humid hot. Fortunately, mostly dry hot.
 
@TimPost anthropology is interesting stuff. i can't stand humid hot (dry hot is bearable). I take it you're married, too. Is your wife also ex-pat?
Does ex-pat mean you're still a US citizen? Are you allowed to vote?
 
user50049
@Jeff That is a long story. I was sent here by a web host almost a decade ago to help set up a new call center we hired. The ops director of that center and I immediately hit it off .. and I have been here ever since.
 
Am I asking too many questions? Are they too personal?
 
user50049
4:56 PM
@Jeff Yes, I am a US citizen (born and raised in Baltimore) and I can vote, however there is always contention regarding and questioning if those votes are counted (absentee ballots, basically)
 
user50049
I tend to eschew politics unless one of them does something dumb enough for me to make fun of on twitter.
 
@Tim What state do you vote in? Is there a big US ex-pat community there? Do you participate in it?
what languages do they speak there? do you speak it after 10 years?
 
user50049
@Jeff There is a community of expats formed by mostly diplomats sent here. There's also a huge influx of indie artists that fly here to produce pro demos since recording studios here are much cheaper. So you have varying communities. I mostly stick with the programmers and I have some local friends through that. Most Filipinos speak English much better than a newcomer could hope to speak Tagalog (Filipino). I know it conversationally, when out and about I seldom speak English.
 
user50049
But out and about mostly consists of buying stuff or other simple things like ordering food, directing a cab driver, etc.
 
user50049
The only way to really learn a spoken language is through to total immersion, and that just can't happen yet.
 
5:05 PM
oh. well, i guess you like it there and speak well enough, or you'd come home. it's probably too warm for me :D (but Filippinos are cute - that kinda balances out the weather :D).
you can learn languages early in life, too. but yeah, even then it's with significant (if not total) immersion.
 
user50049
However, speaking mostly in Spanish, I am understood when I can't quite 'find the words'
 
user50049
Usually that happens when saying a number. Some Tagalog words are mostly consonants (you spell it just like you speak it, phonetically) which is hard for me.
 
oh, wow. can you write tagalog at all?
hey, were getting some users in here! :D
 
user50049
@Jeff Some, the realization that I am in fact nearly illiterate was a wake up call.
 
user50049
@tinkertim "Trying to get going?" But that room is *old*!
 
user50049
5:10 PM
That grumpy old Gorilla.
 
user50049
Anyway, enough about me :) The room topic is C :)
 
declaration: `realtype r[2*N];` ($2*N=16$).
...
(inside a loop indexed by `n`)
`r[n]=a_function_that_returns_realtype;`
 
sbi
@TimPost This was reported to me. Noted and logged!
 
user50049
@sbi For future use?
 
inside of gdb (gnu debugger):
`print r[0]`
debugger says: `cannot subscript something of type `long double'`
what'm I doing wrong?
what's wrong with that gorilla?
2
 
sbi
5:14 PM
@Jeff Just the envy of a chimp, y'know.
 
Oh, and n is declared as int n;
 
sbi
@Jeff Which n?
 
user50049
Oh my. What have I done?
 
@spi lowercase n. There is also an N (C is case sensitive, right?)
 
sbi
@TimPost Just the common folly of a chimp, y'know. :)
 
5:16 PM
@Tim you did this? not bad (especially considering here in US is a holiday). let's talk C!
 
user50049
@Jeff I might have .. ummm .. tweeted something.
 
@Tim cool. there's that many stackoverflowers following twitter, I guess. i will have to create a twitter acct one day
 
sbi
Really, this room has messages from 4 months ago on its starboard. How cute!
(In the C++ room, you usually won't find yesterday's message unless it has at least half a dozen stars.)
 
user50049
@Jeff What is the type of r and why did you pick long double?
 
r is declared `realtype r[16]`.
`realtype` is for making floating point data machine independent. I think it is `long double`.
 
sbi
5:22 PM
Well, @Tim, should you ever feel like wanting to chat, feel free to drop into here. :)
Bye!
 
@sbi that room hasn't been too friendly to me. :(
I asked about something and someone said "is this the (whatIaskedAbout) room?"
 
So where is the C discussion?
 
@Nils You can help with my question! :D
@TimPost right after this post
by Tim
 
where is it?
ah I didn't realize that this is actually Longue(C)
 
It's right after Tim's gorilla post.
But actually, I have to go now, anyway :(. just when it was getting good in here! oh well
 
5:32 PM
@Jeff mind reposting the link?
 
@TimPost this is Tim's gorilla post
@Nils it's the line above this one (that looks like it's addressed to Tim)
 
what?
 
@nils follow the link to tim's post, then below that is my question.
@nils i have to go now, anyway.
also, i think the cause was I was having a "cluster synchronization issue" - that's where each node of a cluster accesses different versions of a file.
bye all!
 

« first day (153 days earlier)      last day (32 days later) »