« first day (715 days earlier)      last day (4249 days later) » 

qox
8:14 PM
@Ell Django is terrible.
Use Flask.
 
Ell
what's wrong with django?
 
I'm suspending a comb from my beard
 
qox
For example, database migrations are a hell if you use an RDBMS.
 
Ell
@DeadMG what!? You have a beard!?
 
@Ell All real programmers have at least some facial hair.
 
Ell
8:17 PM
woah. I totally imagined you without a beard.
 
well, I'm a real programmer, therefore I must have a beard
 
Ell
that's crazy :O
I was at loughborough today. I vaguely remember you saying you were there? or is that my imagination?
 
Xeo
Yay, sleepy time. Getting up in 5 1/2 hours to travel to my interview x_x
 
Ell
@Xeo good luck with the interview :)
 
Xeo
thanks
 
qox
8:20 PM
@Xeo good luck with sleeping :)
 
@Ell I have indeed been around that area.
why did you go there?
 
Ell
both of my older brothers study there
 
I'd advise against
 
Ell
for compsci? why?
 
qox
I'd advice against studying. Working is more fun and gets you money.
 
8:22 PM
because it's a crock of shit
you go there for the Open Day, they show you the cute robot dogs, they tell you how awesome the surveys are, and no useful or relevant information whatsoever
take it from someone who actually had to do that course: don't
 
Ell
right okay
I was actually considering not going to university - could you advise me on any alternatives to a degree? for example, a part time degree, an open university degree, or no degree at all etc. ?
 
I could show you some of the exam papers I did
 
Ell
that would be very helpful :)
 
@Ell Don't know much about the OU, but I get the feeling they're not much different.
as for alternatives, you'd basically have to get a minimum wage job stacking shelves in Tesco or something, and in free time, build a moderately impressive project. When project is done, you have good experience/marketable skills.
 
Ell
ahh okay
 
8:24 PM
I'm torrenting right now so my Interwebs is kinda sluggish
 
Ell
right okay :)
 
but I'll give you the third year Unicode examination when it decides to load
 
Ell
I'm in no rush, any help any time is greatly appreciated :)
I was just worried that jobs might just discard any applicants with no degree
does that happen?
 
well.
all I can say is that I've had some interest, and I found that a lot of jobs won't take even junior programmers without a degree
and there's plenty that want a 2:1 as well
 
qox
I wouldn't even want to work for a company where they look at more than my experience.
They are probably not even informal.
 
Ell
8:28 PM
that's really my concern in not taking a degree
 
hm they don't have the summer one up yet
@Ell Is the only reason to get one.
but eventually I found it so insanely wasteful of my time and money that I just couldn't keep going
 
Ell
but a degree surely teaches you things too? or is what it teaches irrelevant?
 
qox
I am in college right now.
 
it's nothing you can't learn faster, for cheaper, more conveniently, with proper assessment, on your own
 
qox
I teach the teacher more than the teacher teaches me.
 
8:30 PM
there was absolutely nothing I learned in my course that was useful that I didn't already know
 
Ell
@deadmg really? such as what? just a couple of examples
 
who are you asking for? :P
 
qox
The teacher told us that a Boolean could be true, false or null in JavaScript.
Guess what, a Boolean is always only true or false.
 
Ell
I don't really know all they teach for compsci. I guess i should look a syllabus up
 
@Ell We did parsing, lexing, algorithmic complexity, Unicode, virtual memory, etc.
I could give you a list of all the modules I took
 
Ell
8:32 PM
okay :)
That would be helpful too :) but no rush
 
heh
more about "Will my internets load the page?"
right
when I said "Right" what I meant was "It's not actually loaded" :P
ah, here we go
Essential Skills for Computing
trivial introductions to Unix things, mostly
Tex, some Unix system commands
 
@qox Come one. We all know that a proper Boolean is enum boolean {false, true, file_not_found};.
 
CSS, a very brief look at source control, spreadsheets
logic & functional programming
sets and their correspondingly obscure worthless mathematical notation that is no use to anyone
various equally pointless identities and theorems
 
Ell
identities as in derivations?
 
a smidge of Haskell (not enough to be of any real use, of course)
@Ell Naw. Just stating them.
 
Ell
8:38 PM
Right okay
 
most of this stuff I didn't even remember I'd had to look at, it was so unhelpful
 
Ell
wasn't functional programming useful?
or is that stuff you can learn yourself?
 
you need to step back here
the Loughborough CS course does not teach functional programming.
it goes far enough to give you Hello, World, and maybe "Append this integer to a list".
that's pretty much it
 
Ell
oh :/
do you think it would be different at a different university?
different enough to do a degree, or is it most likely all equally as un-useful?
 
I have seen no evidence that any other CS course is any different
that doesn't mean that none are
but I haven't seen one
Programming for the Interwebs- trivial JavaScript and HTML
Introduction to E-Business- some business module something I ignored utterly
Server Side Programming- how to fail at PHP
Computer Systems- stuff like Von Neumann Architecture, binary encodings for integers, etc
 
Ell
8:42 PM
hmm doesn't sound like you go into depth anywhere really
 
nope
 
Ell
computer systems looks helpful
 
not really
 
Ell
I wonder if apprenticeships exist for programming
 
the Von Neumann architecture summarizes as "We like JITs and we cannot lie", which you already know if you've ever heard of a JIT.
 
Ell
8:43 PM
yeah
 
and the binary encodings for an integer are boring as fuck and also unhelpful for any real task
 
Ell
although if I'm good enough at programming I can do what you said and get a shelf stacking job and get experience on my own
 
and did I mention that the examination for this module involves converting between encodings and performing operations on them by hand?
 
Ell
really? o.O
 
yep
 
Ell
8:44 PM
that doesn't seem useful at all
 
it's really not
 
Ell
the whole point of programming is not to do it by hand
 
for one, the only encoding anyone ever uses anymore is two's complement
and for two, it's mostly an implementation detail that's very rarely useful
databases- quick intro to SQL and database normalization
mathematics for computer science- nothing we didn't do at A-level, just a refresher course really
 
Ell
yeah
 
OOP- "Here's the virtual keyword, this is inheritance, gz you passed".
 
8:46 PM
@DeadMG While I agree with quite a bit of what you're saying, that part technically isn't true -- typical (IEEE) floating point uses a combination of a bias representation for the exponent and 1's complement for the significand.
 
@JerryCoffin For floating-point- not integer.
 
@DeadMG Pretty much irrelevant (but your last mention of integers was too far back to be clear that it was intended to apply here anyway).
 
ok
then I concede that some of the other representations are used somewhere.
but I'll stand by the meat of my point, which is that the need to know them arises extremely rarely, it's information you could easily Wikipedia, and operating on them by hand is pure insanity.
 
@DeadMG Fair enough. I, in turn, will concede that for most typical programming it's of zero relevance anyway.
 
Requirements Analysis- what kind of requirements are of what type, feature creep, stuff like that.
also pointless UML diagrams
2D Computer Graphics, or, "How I pointlessly implemented culling for a 2D scene. By hand from memory."
mostly worthless vector and matrix operations and their implementations and derivations- as if every API under the sun doesn't ship them for you
Formal Specification, or, "How nobody, ever, uses this technique except for nuclear reactor control software and stuff, because it's so extremely expensive and slow. So make sure you study hard, average programmer, or you fail."
Operating Systems and the Interwebs, or, "Virtual Memory and 16-bit memory segmentation circa 1990, for example, we teach that virtual memory doesn't allow memory protection."
System Design- more worthless UML
 
8:53 PM
While I agree with the general point that colleges place far too much emphasis on memorization, I think it's worth pointing out that many interviewers do the same, so it's a useful skill for getting a job, even if you'd never even consider writing actual code from memory.
 
OS and Networks- basic TCP/IP stack. I guess it could be useful, if you were doing network code.
Programming Languages- lexing, mostly.
legal issues in computing- stuff like, the acts which cover computer crimes (which we did in GCSE IT anyway). Also involves practically quoting acts and cases from memory. Man, there's a reason I dropped Law.
 
Ell
yeah
 
@JerryCoffin Indeed. The problem is that I'd never consider writing actual code this way.
AI Methods- more pointless sets. A few graph algorithms- BFS/DFS, and pathfinding (greedy, A*, etc). And PROLOG. Oh my god, the PROLOG.
 
Ell
haha
we are doing algorithms in further maths now
kruskals, prims, dijkstras
I'm sorry i have to go now, but thank you so far for the information - it is greatly appreciated :)
 
team project, or, "When I realized that after two years on my course, all of my coursemates couldn't code for shit. Like, literally, couldn't even search the documentation for a function name."
 
8:56 PM
At least IMO, it's often more useful to learn the general idea of an algorithm than all the details. I've basically re-invented what end up being mostly-improved versions of algorithms by learning them (not too carefully), then waiting a year or two before coding something up. What I wrote was rarely exactly what I studied, but it was a useful and (though I didn't realize it until later in most cases) original arguably-improved version.
 
@JerryCoffin Yep.
also, if you do it yourself first, you gain the advantage that you realize you re-invented some important useful algorithm or idea yourself
like a thread pool
I dunno, what makes me more bitter than the fact that university was a worthless waste of time and money is the way that employers seem to treat it as if it isn't
 
Ell
9:15 PM
I'm back :D
 
@Ell I'm front.
 
Ell
I'm aweful hungry.
 
@Ell Ah, you should have said that to start with. But, since you claim to be "back", perhaps some baby back ribs or rump roast would be fitting.
 
Ell
Yes it would. If only I had access to that kind of feast
I need to wait until mum is asleep then raid the cereal cupboard
 
@Ell Somehow that doesn't sound quite so exciting.
 
Ell
9:24 PM
It's not :/
Have you ever read the dragon book?
Compilers principals techniques and tools
 
Could someone explain to me why it's needed to dereference a static 2d array twice?
As I have understood a static 2D array is stored in memory exactly the same as 1D array
 
Ell
Well Dereference once to get x axis, second for y.
 
@Ell I've never (even tried to) read it straight through from beginning to end, but have probably written most parts of it at least two or three times -- just not in order.
 
but if it's stored as contiguous memory shouldn't you be able to access the elements with just 1 pointer?
It makes sense to do it for a dynamically allocated 2D array, since there actually is 2 pointers
 
Ell
well you can if you wish. But why would you make it a 2d array if you wanted to do that?
 
9:30 PM
i'm just trying to understand the logic behind it
i just don't understand how you can dereference a regular pointer twice
 
Ell
Well think of it like this
Just imagine a 2d array as an array containing arrays
So you dereference it once, giving an array and you dereference it a second time to get the position in that array
Imagine a 2d array as an array of columns
the first dereference chooses the column (x value)
The second takes that column and dereferences again at the y position
 
yea, but a static 2D array is not the same as a dynamic 2D array, right?
in memory that is
 
Ell
9:47 PM
Well
Why isn't it? It doesn't matter where something is allocated, it will look the same
 
10:06 PM
you can't de-reference an array.
if you're thinking about that, then you need to revisit pointers and arrays 101.
 
Ell
Oops did not mean dereference
I meant... Array access :p
The [] thing
What is it called?
Also does anyone here know the effects of shisha on health?
 
dafuq is shisha?
 
Ell
Hookah
 
plain english or gtfo
 
Ell
It's some way of smoking tobacco
Apparently you only get the water vapour but I don't beleics that
 
10:20 PM
if you only get the water vapour then why add tobacco?
 
@Ell If you're only getting vapor, then it's not a very effective way to get your nicotine fix, right?
 
and why not just breathe in some steam from a kettle or someshit?
 
Ell
That's what I'm thinking
 
pro tip: if there's tobacco involved, gtfo
 
Ell
yeah, that's what I tell my friends but they don't listen
 
10:20 PM
My brother has a shisha. He uses it for marijuana, though.
 
Ell
And wtf do I let it bother me that they are harming themselves?
 
@Ell Because they're your friends?
 
Ell
Marijuana is no good either
 
well, there's two attitudes
there's "Oh fuck, my friends are harming themselves. Call health professionals/police immediately." or "It's their own choice and I'mma let them live with the consequences of which they are fully informed".
 
@Ell Indeed, but at least you feel something.
 
Ell
10:22 PM
Yeah I know but I care far too much for one ex girlfriend in particular. She has no respect for herself
 
@Ell Not the same girl you keep talking about, hm?
 
Ell
@etienne do you smoke/take marijuana
Yerp a derp :P
 
what is if x&n
 
@Ell Did a few times. Was fun, but I wouldn't do it alone.
It's a social activity, see. A bit like drinking.
 
Ell
why not?
 
10:24 PM
Because if I do it alone I'll feel like I'm compensating for something.
 
Ell
Yeah I guess
you mean your compensating for your life being boring for example?
 
the difference between drinking and smoking is that drinking is perfectly fine in moderation
 
does anyone know
 
@Ell Yes.
@DeadMG Even then, it depends. I heard numerous time that red wine is good for the heart, for instance. But I also heard that beer is carcinogenic.
 
Ell
Peer pressure makes me sad :(
Because I beat it
 
10:28 PM
if peer presssure makes you sad, get new peers.
 
does anyone know what "if (x&n)" means
 
Ell
Ermm is that logical and?
Or bitwise and. I forgot
 
i dont understand what it is doing
 
Ell
It does bitwise and
 
the same thing as if(expr) for any expr that returns an integral type
first it evalutes expr, then it checks if the result was not zero
 
but I don't know what x&n is
 
Ell
Anyway I'm off to sleep this time, Nighty night all
 
like x&1 seems to equal x%2==1
but i dont know why
 
A bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast, primitive action directly supported by the processor, and is used to manipulate values for comparisons and calculations. On simple low-cost processors, typically, bitwise operations are substantially faster than division, several times faster than multiplication, and sometimes significantly faster than addition. While modern processors usually perform addition and multiplication just as fast as bitwise operations due to their longer instruction pipelines and oth...
 
so how can i rewrite if(x&n) ?
 
10:36 PM
Why do you want to rewrite it? And is n a fixed number or a variable?
 
qox
Good morning.
 
@qox lol now is 00:38 in my country xD
 
qox
Same here.
 
fixed
but, different fixed
x&1, x&2, x&4, x&8
 
@Zaffy See, it's morning. Kinda ^^
 
10:39 PM
trying to understand what they mean and if i can rewrite them in a way that makes sense to me
 
x&powerOfTwo checks whether a certain bit is set. x&1 checks whether the first one is set, x&2 whether the second one is set, x&4 whether the third one is, etc
 
Have you considered learning something new such that this makes sense to you, so that you don't need to rewrite anything at all?
 
A more general way to check it would be (n >> bitToCheck) & 1 or n & (1 << bitToCheck)
 
@LucDanton bc I will understand it better if I understand it in different forms
oh i see so x&1 works because it's the first bit, so checking x%2==1 is basically checking the same thing
 
Ah well if the rewriting is a means to the end of learning that is different than rewriting as an end itself.
 
10:44 PM
so x&2 checks the second bit from the right?
e.g. 10010
 
@JohnSmith yes
 
would be true for that?
 
qox
Every time I am doing bitwise arithmetic, I wish I have binary integer literals.
 
hmm the >> << stuff doesnt work
 
@qox UDL to the rescue!
 
10:49 PM
@JohnSmith I realize this is a difficult request but
could you possibly be less specific?
 
@DeadMG was referring to NikiC's earlier post
 
qox
@NikiC is it possible to make those constexpr? That would be really awesome.
 
@DeadMG trying to understand a way to rewrite "if(x&n){"
 
I know both of those things.
my point is that "Doesn't work" is horrifically unhelpful.
how is NikiC going to correct his advice if he doesn't know wtf is wrong?
 
so i don't know why it doesn't work
doesn't work as it isn't returning the same output
is there any other way to do a x&n?
 
10:54 PM
it's better to just know what operator& is.
 
@JohnSmith x&n will have those bits set which are set in both x and n. A very common usage is to check for a set of flags. If x encodes a set of boolean flags and n specifies a certain combination of flags, then if(x&n) means "if x contains any flag in n".
@JohnSmith if in binary format x=011101 and n=001011 then (x&n)=001001, for both x and n have bits 0 and 3 set, while for any other bit either of x or n had a '0'
 
gotcha
thanks
 
11:20 PM
Hi, and I mean really high!
Have you changed your image screen container, @DeadMG ? :)
 
huh?
 
Nice to see you, too! :)
I need help and it's about something vague.
I am not sure if I can post it here, since it may appear to be very plebby.
 
well, make it quick
I'm off to sleep soon
 
What does ... mean in C++?
 
variadic template stuff
 
11:25 PM
like in this part of the code
{ return to_binary<0, Cs...>::value; }
 
depends on where you've seen it
oh, that's a variadic template pack expansion
 
or variadic (non-template) arguments
 
Thank you both, I shall now check wikipedia for more info about it.
 
@Walter Not in that context.
 
@DeadMG I know, was too slow in typing (he came with the context before I looked)
anybody ever used dlopen()?
 
11:28 PM
presumably, it has been used by someone, somewhere
 
sometime
 
is there a C++ wrapper or alternative to dlopen?
 
OK, this may appear very silly and plebby too, but I have to ask it. What does following two scenarios(::, :) represent in the code, to_binary<0, Cs...>::value; ------ struct to_binary<Acc, C, Cs...>
: to_binary<Acc * 2 + (C == '1' ? 1 : 0), Cs...>
 
the struct to_binary<Acc, C, Cs...> is derived from (has base class) to_binary<Acc * 2 + (C == '1' ? 1 : 0), Cs...>
 
11:34 PM
:: is called the scope resolution operator, although it is a vastly different beast from an operator like +. It is used when referring to entities (things that have names). For instance to write to Standard output you can use the std::cout object: the object named cout in namespace std. In this case to_binary</* things */> is not a namespace (the C++ construct) though.
: is not an operator, it can have different meanings depending where it appears. The two are not related.
 
for example, if Acc=4, C='1', Cs='?','1','q','@' then struct to_binary<4,'1','?','1','q','@'> has base struct to_binary<9,'?','1','q','@'> ;-)
 
@Walter I don't know of either. Imo dlopen is a brilliant interface, so you could either use it as-is or write a simple wrapper if you find yourself always using it the same way. Although it's true writing a full-fledged wrapper with all the functionality is a bit ambitious.
 
OK, as far as I can get it now, value is a struct of to_binary<0,cs...>, right? And the second one is has a base class?
 
Out of curiosity I did write a wrapper for the simple case of loading a module. Doesn't take much.
@Takarakaka Be careful that this is metaprogramming. While it does make use of the same C++ facilities you'd use the rest of the time like inheriting, the intended effect is not the same.
So for instance it is true technically that one of the specialization has a base. The real intended effect is to mean e.g. "this case is implemented with the semantics of that case".
 
If I have understood you well, you are saying that this basically behaves like a controller for what should the case we are talking about need to have from the native case, right? @LucDanton
 
11:45 PM
Well, if you've ever done that kind of thing, it's a recursive (meta)function that pattern matches on the variadic pack where the general case chops of the first element of the pack and recurses on that.
(The general case is the last one.)
The first specialization is the terminating case.
I don't know how to answer your question specifically because I don't know what you mean by 'controller'.
 
:) OK, now I have understood it completely. Just one thing, does it do recursion all the time just on the first element of that variadic pack, or on the ints?
 
What ints?
 
Well, what if I had <3,1,F,3,S,!,%,t> tuple, does it do the processing just over the 3,1 or does it include 3 from the variadic pack too?
 
Here is a rewrite that does metaprogramming with constexpr functions instead of metafunctions.
 
Oh, it's very clear to me now, that was one silly Q.
 
11:52 PM
@Takarakaka I'm not sure I understand. Perhaps you could try running the tuple through one or two steps to get a feeling for the algorithm?
 
Thank you for your help, @LucDanton. I appreciate it very much. :)
I need to go now to sleep, 'cause it's very late, wish you all good night and sweet dreams! :)
 

« first day (715 days earlier)      last day (4249 days later) »