code logs -> 2015 -> Fri, 04 Dec 2015< code.20151203.log - code.20151205.log >
--- Log opened Fri Dec 04 00:00:52 2015
00:01 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
00:01 mode/#code [+qo Vornicus Vornicus] by ChanServ
00:10 thalass [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
00:11 mode/#code [+o thalass] by ChanServ
00:42
<@Reiv>
Remind me on trivial math
00:43
<@Reiv>
2/3 * 3/4 = ?
00:45
< [R]>
IIRC it's the same as (2 * 3)/(3 * 4)
00:45
< [R]>
Yeah, a/b * c/d == (a * c)/(b * d)
00:46
< [R]>
That one specifically is 2/4 or 1/2
00:52 Derakon[AFK] is now known as Derakon
01:07 Netsplit *.net <-> *.split quits: @Kindamoody[zZz], gizmore, @Tamber, wowaname, @Derakon, @ToxicFrog, @JustBob, @Crossfire, Orth, @jerith, (+25 more, use /NETSPLIT to show all of them)
01:08 Netsplit over, joins: &Reiver, @PinkFreud, &jerith, VirusJTG, &ToxicFrog, Orth, &jeroud, @Tamber, @himi, @mac (+25 more)
01:47 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
01:47 Meatyhandbag [sebastianfe@Nightstar-fin.ajr.224.136.IP] has joined #code
02:33 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
02:33 mode/#code [+o Reiv] by ChanServ
04:09 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
04:52 Turaiel[Offline] is now known as Turaiel
05:19 Derakon is now known as Derakon[AFK]
05:26 AverageJoe [evil1@Nightstar-m9vhgf.public.wayport.net] has joined #code
05:38 Kindamoody[zZz] is now known as Kindamoody
05:39 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
05:45 Turaiel is now known as Turaiel[Offline]
05:48 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
05:51 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
05:51 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
05:56 Kindamoody [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has quit [Connection closed]
05:56 Kindamoody|autojoin [Kindamoody@Nightstar-0lgkcs.tbcn.telia.com] has joined #code
05:57 mode/#code [+o Kindamoody|autojoin] by ChanServ
05:57 Kindamoody|autojoin is now known as Kindamoody
05:59 celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:01 AverageJoe [evil1@Nightstar-m9vhgf.public.wayport.net] has quit [[NS] Quit: Leaving]
06:02 Meatyhandbag [sebastianfe@Nightstar-fin.ajr.224.136.IP] has quit [Client exited]
06:24 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
06:27 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
06:27 mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ
06:34 Crossfire [Z@Nightstar-pdi1tp.customer.tdc.net] has quit [Ping timeout: 121 seconds]
08:55 Kindamoody is now known as Kindamoody|afk
09:09 Emmy [Emmy@Nightstar-384h6h.static.chello.nl] has joined #code
09:28
< Emmy>
Aaaaargh
09:28
< Emmy>
VBA focus rules are WHACK
10:30
< Emmy>
(implying the rest of vba isn't, lol)
10:31 * TheWatcher nocomments.
10:35 * Emmy nodcomments
10:43
< abudhabi>
What's wrong with Visual Boy Advance?
10:47
< Emmy>
Visual Basic for Applications. :P
11:13
< Emmy>
And as for the answer to what is wrong with that? It's made by microsoft
11:15 Emmy [Emmy@Nightstar-384h6h.static.chello.nl] has quit [NickServ (RECOVER command used by Emms)]
11:15 emmy [Emmy@Nightstar-384h6h.static.chello.nl] has joined #code
11:15 * emmy grrrs at the wifi
11:25
< emmy>
Hmmmmh
11:25
< emmy>
Say
11:26
< emmy>
does microsoft provide (free?) courses for their own products?
11:27
< emmy>
'cause my current course... Well, lets just say the author and i don't agree. :P
11:27
< emmy>
he tends to do things rather improper.
11:28
< emmy>
I keep having to look on the msdn site, and then find out that the way he does things is NOT the recommended manner. :P
12:43 catadroid [catalyst@Nightstar-n0udgf.dab.02.net] has joined #code
14:09 Meatyhandbag [sebastianfe@Nightstar-fin.ajr.224.136.IP] has joined #code
14:11 emmy [Emmy@Nightstar-384h6h.static.chello.nl] has quit [Ping timeout: 121 seconds]
14:47 Turaiel[Offline] is now known as Turaiel
15:48 Turaiel is now known as Turaiel[Offline]
16:06
< Meatyhandbag>
question. If I make a 2D Array that's 2 by 10, will the array.length equal 10 or 20?
16:09 Derakon[AFK] is now known as Derakon
16:11
<&ToxicFrog>
Meatyhandbag: in what language? But depending on how you order the dimensions, typically 2 or 10
16:13 Emmy-zZz is now known as Emmy-Werk
16:14
<&ToxicFrog>
>>> a = [[x for x in range(10)] for y in range(2)]
16:14
<&ToxicFrog>
>>> len(a)
16:14
<&ToxicFrog>
2
16:17 Emmy-Werk is now known as Emmy
16:23
< Meatyhandbag>
ToxicFrog: Javascript
16:27
< Meatyhandbag>
I'm trying to make a 2 layer slideshow that shows content from two different years. So, go into year 1, you can click through a list of content from that year, and then slide into year 2 to do the same.
16:28
<&ToxicFrog>
Open the console, try it and see?
16:29
< Meatyhandbag>
how do I open the console on a windows 8.1?
16:31 Emmy is now known as Emmy-AFK
16:32
<&ToxicFrog>
I'm assuming you're doing JS because you want to do a thing in the browser. Open the browser's debugging tools.
16:32
<&ToxicFrog>
In Chrome that's ctrl-shift-C
16:34
< Meatyhandbag>
would still be useful to actually know how to open the console up in windows
16:38
<&ToxicFrog>
On pre-win8 it's start->run, cmd.exe or (I think) start->run, powershell depending on whether you want the legacy shell or powershell
16:38
<&ToxicFrog>
I assume it's similar on win8
16:38
<&ToxicFrog>
But I just use bash, and none of those are relevant to JS work anyways
16:39
< Meatyhandbag>
wait, I did some googling and I'm hearing that you can't make a 2D array in javascript?
16:41 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
16:41 mode/#code [+o Crossfire] by ChanServ
16:47 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
16:47 mode/#code [+o gnolam] by ChanServ
17:14
<&ToxicFrog>
Meatyhandbag: where are you getting this?
17:14
<&ToxicFrog>
a = [[1,2,3],[4,5,6]]
17:14
<&ToxicFrog>
[Array[3], Array[3]]
17:14
<&ToxicFrog>
a[1][0]
17:14
<&ToxicFrog>
4
17:17 catadroid` [catalyst@Nightstar-qn9fik.dab.02.net] has joined #code
17:17 celticminstrel [celticminst@Nightstar-uce74q.dsl.bell.ca] has joined #code
17:17 mode/#code [+o celticminstrel] by ChanServ
17:20 catadroid [catalyst@Nightstar-n0udgf.dab.02.net] has quit [Ping timeout: 121 seconds]
18:09 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
18:40 catadroid` [catalyst@Nightstar-qn9fik.dab.02.net] has quit [[NS] Quit: Bye]
18:59
< Meatyhandbag>
http://jsfiddle.net/u3es1ehs/1/ << ToxicFrog can you look this over and tell me what I'm doing wrong?
19:03 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [Connection closed]
19:03 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
19:08 * abudhabi sets up a samba.
19:08
< Meatyhandbag>
a what?
19:09
< abudhabi>
A shared network drive.
19:09
< abudhabi>
Meatyhandbag: What are you trying to do there?
19:10
< Meatyhandbag>
make a 2 layer slideshow. Where it'll show the list of testimonials by their respective year
19:12
< abudhabi>
Meatyhandbag: Table columns go inside table rows, not the other way around, IIRC.
19:12
< Meatyhandbag>
oops
19:19
< abudhabi>
You appear to have misspelled the on-click invocations of your functions.
19:19
< abudhabi>
The functions are uniformly SRC but some of your names in the HTML start with SCR.
19:21
< Meatyhandbag>
I don't follow
19:22
< abudhabi>
srcYearL is not the same os scrYearL.
19:22
< abudhabi>
According to my console, the buttons do try to execute the functions, but find that they are not defined.
19:23
< Meatyhandbag>
how're they not defined?
19:24
<&ToxicFrog>
Because, as just stated, srcYearL is not the same as scrYearL. If you name your function one and try to call the other, that is what will happen.
19:24
< Meatyhandbag>
I don't understand. how can two things spelled the same way not by the smae?
19:26
<&McMartin>
Look more closely at the second and third letters.
19:26
< abudhabi>
Also, you made a few syntax errors.
19:26
< abudhabi>
The console in the browser is really helpful.
19:26
< Meatyhandbag>
OOOH! :P my bad, thanks McMartin
19:26
< abudhabi>
RClick anywhere, pick Inspect element, find the Console.
19:28
< abudhabi>
I'm not quite sure JS supports multidimensional arrays out of the box.
19:29
< abudhabi>
At least not the way you're trying to initialize them.
19:33
<&ToxicFrog>
With [][]? Yeah, no
19:33
< Meatyhandbag>
Yeah, I fixed it to be [[]]
19:33
< abudhabi>
[[],[]] seems to be the way here.
19:33
<&ToxicFrog>
Yeah. A 2d array is an array of arrays.
19:34
< abudhabi>
http://jsfiddle.net/8eq25ggj/ <- Here's a marginally more functioning fork.
19:34
<&ToxicFrog>
The general case is initialize to [] and then create the subarrays with a for loop, AIUI, since js doesn't support fill() or __index
19:34
< Meatyhandbag>
so, should I do p[0,0] then?
19:34
< abudhabi>
No.
19:34
<&ToxicFrog>
No, why?
19:34
< abudhabi>
The access is fine.
19:36
< Meatyhandbag>
ToxicFrog: why'd you add ; to the end of the function's {}?
19:36
< Meatyhandbag>
er, abudhabi I meant, not ToxicFrog
19:36
< abudhabi>
Because I'm pedantic.
19:37
< Meatyhandbag>
ok, thought there was a syntax issue
19:37
< abudhabi>
Something is wrong with the functions, because the clickybuttons don't recognize them as defined.
19:42
< abudhabi>
Yeah, you have race issues here.
19:43
< Meatyhandbag>
race?
19:43
<&McMartin>
Data race
19:43
< abudhabi>
http://jsfiddle.net/koz0jwh9/ <- Changed the javascript settings to include the script in the head, rather than a onload wrapper.
19:43
< abudhabi>
Now it sort of works, even.
19:43
<&McMartin>
The clickybuttons are probably trying to refer to the functions before the scripts that define the functions have run
19:43
< abudhabi>
Yes.
19:44
< abudhabi>
I *think* this code would run outside of a fiddle.
19:45
< abudhabi>
Meatyhandbag: I invite you to consider learning jQuery. Using pure JS is like pulling teeth.
19:45
< abudhabi>
Also, please don't pollute global space.
19:45
< Meatyhandbag>
abudhabi: I don't see what you changed
19:45
< Meatyhandbag>
what do you mean Global Space?
19:46
< abudhabi>
You see the JAVASCRIPT button in the upper right of the script space with the cog next to it?
19:47
<&McMartin>
If you're just putting some simple dynamic behavior into a web page, namespace pollution seems like a trivial issue
19:47
< abudhabi>
Global space is, well, where you appear to be putting your variables. Rather than all in functions.
19:48
< abudhabi>
It becomes a bigger problem when you add lots of scripts.
19:48
<&McMartin>
Ah, this is the issue with variables being global by default
19:48
<&McMartin>
Right
19:48
< Meatyhandbag>
abudhabi: there's still an issue it seems. as it refuses to actually scroll through the array, but rather just flips back and forth between the same two ones
19:49
< abudhabi>
Meatyhandbag: Well, that's a programming logic problem, not a syntax problem!
19:49
<&McMartin>
(As opposed to "all your JS code you're writing should only ever add one symbol total to the js namespace", which is good advice, but it's good advice the way "you should have an ObjectFactory doing this" is good advice in Java)
19:51
< abudhabi>
McMartin: Personally, I just slap a $(document).ready(function() {}); around them and call it a day.
19:51
<&McMartin>
The variables like x here would normally be encapsulated with various closure tricks, but if you're still learning the basics then "Oh yes, JS's function semantics are basically identical to Lisp's, so you can use nested function definitions and upvalues to add both objects and private variables to the language, which you should both do and use" is unlikely to be super-helpful.
19:52
<&McMartin>
Hm. That will export nothing, right? Usually you want to export a module name so stuff can get in and use it, right?
19:53
< abudhabi>
If you're exporting a module.
19:53
< abudhabi>
I've found utility in that like once.
19:53
< abudhabi>
Meatyhandbag: Look at your Test functions. You appear to have copy-pasted from the Year functions, and they cycle exactly like your Year functions.
19:54
< abudhabi>
Meatyhandbag: Instead of cycling through the available space, they cycle through 0 and 1.
19:54
< Meatyhandbag>
oops
19:55
< abudhabi>
Meatyhandbag: Since your array is asymmetrical, you also can't use just one value. You need to detect whether 16 or 10 is the limit, and also modify x when you change y to make sure they don't point into unallocated space.
19:57
< Meatyhandbag>
I do change x when I change y, but I don't know how to detect the length of individual rows
19:58
< abudhabi>
You can hard-code it. if (y == 0 && x > 10) x = 0; if (y == 1 && x > 16) x = 0; etc, etc.
19:58
<&ToxicFrog>
p[n].length
19:59
< abudhabi>
Oh, yeah, that's a good idea.
20:00
< abudhabi>
You could also check if whatever the values point is undefined (I think, but JS's truthiness, falsiness and undefinedness are :gonk:) and reset to a known proper pointer.
20:01
< Meatyhandbag>
how does p[n].length work? Do I just replace n with the variable that defines row choice?
20:01
< Meatyhandbag>
so p[y].length?
20:02
< abudhabi>
That should work, I think.
20:06
< Meatyhandbag>
OK! Great! Got it all finished up
20:07
< Meatyhandbag>
How just to add some CSS to hold it all together! thanks everyone
20:08
< abudhabi>
Happy to help.
20:44 Emmy-AFK is now known as Emmy
21:13
< abudhabi>
[R]: TightVNC is working great for me with Remmina.
21:14
< [R]>
Excellent to hear.
21:14
< abudhabi>
I think the default client, which I've also tried, was horribly slow.
21:15
< [R]>
<Meatyhandbag> would still be useful to actually know how to open the console up in windows <-- Win95+ Windows-Key+R; cmd (command if 95, 98 or ME)
21:15
< abudhabi>
Not that console!
21:15
< abudhabi>
The browser console.
21:15
<&McMartin>
Developer menu in Firefox and Chrome has the option
21:16
<&McMartin>
Though Firefox changes where that is every two weeks, etc
21:16
<&McMartin>
But that's no different from Linux
21:17
< [R]>
abudhabi: he meant that one. I read the context :p
21:17
< abudhabi>
Really?
21:18
< abudhabi>
Huh.
21:18
< [R]>
Yeah, he misunderstood the instruction to open the web-dev console. Assumed he needed the Windows terminal thing instead. Got instructions to open the webdev one in Chrome, then asked specifically for the Windows one for additional, unrelated, information.
21:19
< [R]>
Also IIRC F12 is the standard to open the webdev console in both FF (Firebug) and Chrome.
21:21
< Meatyhandbag>
[R]: I use 8.1
21:22
< [R]>
Meatyhandbag: That's came after Win95, and thus is Win95+.
21:22
< Meatyhandbag>
thanks
21:26
< [R]>
<abudhabi> You could also check if whatever the values point is undefined (I think, but JS's truthiness, falsiness and undefinedness are :gonk:) and reset to a known proper pointer. <-- yeah... it's best to just use typeof to check for undefined.
21:37
<&McMartin>
wat.mov
21:37
<&McMartin>
If you haven't seen wat.mov
21:37
<&McMartin>
https://www.destroyallsoftware.com/talks/wat
21:37
<&McMartin>
It is relevant to the :gonk:ery
21:38
< abudhabi>
It's good.
21:38
< abudhabi>
Is it actually a mov?
21:39
<@Tamber>
No, it's an .rm
21:39
<@Tamber>
:p
21:39
<&McMartin>
The "download" link at the bottom says .mov at the end
21:39
<&McMartin>
I haven't tried downloading it and running file on it to parse its internal metadata
21:41
<&McMartin>
"This is not a wat, this is part of how awesome Ruby is, but if you actually *do* this..."
21:47
< abudhabi>
WAT
21:47
< abudhabi>
Hm. You store images in a database in a blob type, yes?
21:48
< [R]>
If you must, BLOB is the type you need.
21:49
< [R]>
Otherwise you'll have to HEX or Base64 encode it and store it in TEXT/VARCHAR
21:50
< [R]>
But that's even worse than the idea of storing files in SQL in the first place
21:51
< abudhabi>
What's wrong with the idea?
21:51
<&McMartin>
My initial snarky answer is "I think the most popular indexed database for file-size blobs is called a 'filesystem'" but I admit to total ignorance in this domain.
21:52
<&McMartin>
But yeah, if I were designing something that had to keep such things straight, I would probably use some kind of content-addressable file scheme and store relative paths in the relational database proper.
21:53
< abudhabi>
OK. I'll design it such a way that I can relatively easily change approach to images later.
21:54
<&McMartin>
I hasten to add that you should not rely on my opinion here
21:56
< [R]>
abudhabi: it's the worse solution of possible solutions to multiple problems. Ultimately if you're at the point you're ignoring solutions that don't induce other problems. Problems it can cause: DB is bottlenecking on disk i/o or network i/o because it's having to process huge unstructured (in its eyes) blobs of data. DB is needing to be partitioned/sharded despite having a low row count. DB replication is failing. DB is running out of diskspace. etc...
21:57
< abudhabi>
Right.
21:57
< [R]>
If the DB is purpose oriented for the file storage, it might not be that bad. But if you're using it for other stuff too...
21:57
< [R]>
Basically it's a recipie to aggrevate issues the DB wouldn't be having for its use otherwise.
21:58
< abudhabi>
OK.
22:15 Kindamoody|afk is now known as Kindamoody
23:24 ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
23:26 ion [Owner@Nightstar-gmbj85.vs.shawcable.net] has joined #code
23:35 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: ]
23:40 Tamber [tamber@furryhelix.co.uk] has quit [[NS] Quit: ~~+++~~ATH]
23:40 Tamber [tamber@furryhelix.co.uk] has joined #code
23:40 mode/#code [+o Tamber] by ChanServ
--- Log closed Sat Dec 05 00:00:08 2015
code logs -> 2015 -> Fri, 04 Dec 2015< code.20151203.log - code.20151205.log >

[ Latest log file ]