« first day (21 days earlier)      last day (130 days later) » 

2:31 AM
I'm gonna leave this here, because I'ts late, so I'm gonna get offline. I'd appreciate the scolding in the morning of how I'm doing it all wrong:
0
Q: requestAnimationFrame function within callback is undefined

Nick DuggerThis seems to be happening only about half of the time, which is why I find myself actually taking the time to write out a question. I have an array of objects, each of which contain a .draw(canvas) method, which "draws" that object to the canvas. You can see that the method clearly exists --...

 
2:44 AM
@NickDugger I thought you had a developer job
 
Are you making fun of me now? lol
 
Oh
Chromium has pause on exceptions
One of your components is undefined
Or rather doesn't have draw
 
It does, though... When I inspect it in console, even when it throws an error, everything looks fine
 
If you use pause on exception, you can see for which i the errors is happens
My guess is that the objects of type vorge.event don't have draw
 
Not sure how that's possible.
 
2:52 AM
Use pause on exception
 
I mean, I see where it paused, but I already knew what line was being finnickey.
 
Now type i in the command line
 
i is 0
 
Now type game.components[i]
 
Oh... I think I see what's happening... So, I'm using promises... I guess sometimes the components are promises and other times, they're the real objects.
Promise.all(game.components).then(function(components) {
	game.components = components;
});
^ isn't working right
it seems
Each promise returns the object, so "components" should be an array of objects, instead of promises
but it's not sometimes...
 
2:57 AM
People will need more code to fix your problem
 
I see that now. I wasn't aware that it was my promises causing the issue
I might be able to fix it on my own, now that I know that
I wanted to get some sleep... I guess not
 
Sounds like a fun night
 
@copy I fixed it... I just had to rename/move things around for my promises... It's all better now. I know I should know better and use the dev tools more, but I usually don't have to do any real debugging at work. I don't get to write fun things at work.
but I really appreciate the help
 
m59
3:43 AM
Ah so this is where everyone is. Oh, nm, that was an hour ago.
 
 
2 hours later…
5:47 AM
I'm still alive!
 
 
1 hour later…
7:04 AM
in PHP, 35 mins ago, by Wesley Crushed
is SO hosted in France?
in PHP, 35 mins ago, by Wesley Crushed
user image
 
Good joke
Hi future employer
 
Hi
 
What's the joke ? Are we French commonly described as nazis ?
 
You've been famously invaded by them.
 
Did we ?
 
7:13 AM
 
7:25 AM
rl.on("line", (function(line)
{
    try {
        console.log(eval(line));
    }
    catch(e) {
        console.log("error:", e);
    }
}).bind(this));
Neat
Running a server but still allows me to set debugging levels or inspect stuff
Like in a browser
 
Hum... yes....
 
@rlemon @Loktar
 
7:50 AM
% node server/loadtest.js
Creating 10 fake clients ...
[1]    15546 segmentation fault (core dumped)  node server/loadtest.js
I'm between yay something works and fuck it I'll use Python
 
8:02 AM
I still haven't decided if I would write miaou in node or in go if starting from scratch now. node and js have some very good and bad points...
 
You should consider a non-JS high level language like Python
 
I like Go. It's kind of low levels but with many of the constructs of Python and other modern languages and none of the things I dislike like exceptions, inheritance tree, etc.
 
Uh, we're not going to be best friends
I think languages without exceptions are about as powerful as a potato
Like 25 years back in time
 
Exceptions are great when you don't want to fix a bug and you want to keep it buried in your code so that it presents itself as a wonderful surprise a few months or years later
 
No, actually they're there to indicate an error condition, for instance division by zero
 
8:12 AM
Go has another solution for error condition : most functions which can error return 2 values : the normal one and an error (usually nil)
It makes you handle the condition at the calling point, not somewhere very far in another totally unaware component
Go isn't perfect on that matter (I find it a little too verbose on that) but that's the best I know
 
But often you pass the error to the parent anyway. Exception make you not have to write that
Also you can catch specific exceptions
 
@copy The idea in Go is to avoid passing the potato to the parent in most cases
In Go, in fact, there are exceptions, but only for exceptional cases
 
Meh, I'm not convinced
 
@dystroy naa, in practiceyou end up using panic and recover, and defer for resource management.
 
I saw a presentation from a developer of a company (I think gitlab or so) and how they deploy their Python stack
And it was really simple
Simple and just a little less efficient than Go or whatever
 
8:22 AM
There are a ton of reasons to prefer JS over Python at your backend, and a ton vice versa
Deployment is usually simple. Our deploy is git push or "right click -> publish"
Depending on the project.
 
Oh, I didn't mean deploy
I meant, how they build up their architecture, multiple server etc.
 
That's not very hard in Node either
 
@BenjaminGruenbaum I've never used panic and recover and I think most go coders don't
 
@dystroy what about defer?
 
@BenjaminGruenbaum Well, I use defer, it's convenient, it lets you write the resource liberation just side to the opening
 
8:29 AM
@BenjaminGruenbaum Of course not, but it justifies using more servers instead of more development time
 
I don't think developing web applications in Python is even faster, not even a bit.
 
Compared to Go?
 
Even if we ignore sharing code between the client and the server (and there is really no reason to do that), node's ecosystem is much better for web and libraries imo
@copy I wouldn't use Go for web development, I don't understand why people develop web with a language that's that low level
 
That's exactly the point I'm trying to make (and I disagree with your other points, but that's for another time)
 
It's strongly typed but it's missing a lot of features that you'd expect a strongly typed language to have, and it's missing a lot of libraries you'd expect it to have, and they still break it every now and then.
I think it might be interesting to consider it in a year or two.
 
8:32 AM
@BenjaminGruenbaum I made a realtime game server (including chat) in go, it wasn't much more code than if I had made it in node (but there wasn't any fallback for websockets and I could only do it because I know the basics of how the web works). More importantly most of it was very clean
 
@copy did you see the "breaking the speed limit" Python lecture?
@dystroy really? Because a simple echo server with node sounds like 20 lines of code tops.
 
@BenjaminGruenbaum I believe no
 
@copy it's very good, lemme find it
 
@BenjaminGruenbaum well, you have very good standard libraries in go for the basic stuff like that
 
@copy I'm not sure but that might be it: vimeo.com/79539317
 
8:35 AM
But I wouldn't argue go is the right choice if you only do basic or templating web stuff
 
@dystroy Is that open source?
 
@copy no, I have a few open source web stuff in go, not this one, and they're not really pretty as they're old and I was learning...
To be honest I only recently turned to open source so most of my programs aren't
 
@copy you might hate the fact he demonstrates how Windows is oh so very superior to Linux in terms of OS architecture several times in that lecture - so there's that.
 
@BenjaminGruenbaum That's ok, I know many internals and can make my own judgement in that regard
 
8:41 AM
The mission saving in spacebullet is written in go but most of it is boilerplate as I was planning for more features which didn't come
 
 
4 hours later…
12:38 PM
@rlemon Enjoying your day?
 
12:54 PM
yea just woke up
:P
i always love that google remembers your birthday
 
happy birthday @rlemon
 
thanks
 
now I can say it an be correct!
 
!!drip or tank
 
@rlemon tank
 
1:48 PM
yesterday, by Florian Margaine
The js room when zigi is in room 17
 
 
2 hours later…
3:26 PM
I want to bin the last 50 messages or so in room 17
 
Sounds good to me.
 
I'll wait until I can get a record of how many messages are moved to the bin
 
3:42 PM
@FlorianMargaine You know stuff, right? Solve all of my problems.
 
Send
I... I'll try.
 
Ever used python's ctypes? Ever had to read a struct from a file, with said struct containing a char array?
 
Nope, sorry
 
$ grunt init
Loading "Gruntfile.js" tasks...ERROR
>> Error: ENOENT, no such file or directory '.npmignore'
Warning: Task "init" not found. Use
trying to install Ghost
 
gaw
 
3:44 PM
bullcrap
I'm following instructions!
 
Oh wait
 
downloaded the zip, unpacked it, npm install ran fine
 
freezes
 
grunt init fails hard
 
You mean putting data from a file in a struct field? Field being char array?
 
3:45 PM
Sort of
 
17 blows
 
Haven't used python ctypes though
 
59354 is where it's at now
 
But yeah
 
// I've got a struct:
struct crap {
    uint32_t crap;
    uint32_t length;
    char str[];
}
 
3:46 PM
Hm
 
length is the length of str
Reading it from a file is no problemo
 
Standard buffer shigmanig, at the end result = (struct crap*)&buffer;
I have no clue how to reproduce that in ctypes
Since the structs there are really fixed size, when I allocate one, it treats str as a char * and can't hold enough memory.
Tried playing around with reallocations etc, but they seem to not like that too much.
 
I don't know what ctypes are
 
huh, I could define a type on runtime based on the length
 
3:49 PM
Uh, no
 
That might work
Not in C of course, in python
 
I'd go read how other projects do it tbh
 
ctypes is a way of calling C functions from Python
 
 
1 hour later…
5:12 PM
upstream app_blog {
  server 127.0.0.1:7078;
}
server {
  listen 80;
  server_name blog.rlemon.ca;
  location / {
    root /var/www/blog;
    proxy_pass app_blog
    proxy_redirect off;
  }
}
looking on google it says subdomains in nginx are super simple
but this doesn't work
 
Doesn't work how?
 
I've used this exact config for another domain (not a sub)
nope
 
Is it trying to access the wrong server?
 
ahhpics.com is the same config
see the nginx500 like I expect
nothing
(ghost is running on 127.0.0.1:7078)
 
You also need to set up dns to point to that host
 
5:16 PM
Are you sure your domain is DNS configured correctly?
ping blog.rlemon.ca fails with unknown host.
 
facepalm I for whatever reason was thinking the main domain points there, subdomains should as well
 
:P
You should have @ and *
I did the same mistake once
 
@Zirak No idea
 
and now we play the waiting game
 
@rlemon works for me now
 
5:18 PM
not me, yet
 
@Zirak I believe you can't read a not fixed struct like that anyway. How would the compiler know the size
 
I see you requesting resources tho
 
Yeah well, let it propagate
 
:D
 
Ah, nevermind
 
5:19 PM
=P
I remember seeing a tool that tells you if your DNS is seen correctly from different servers around the world
But I can't remember the site that hosted it and it drove me insane
 
@copy It's annoying that I now have working C code, but can't express it well enough
The opposite of my usual situation
 
Express it well enough?
 
Write it out in python
 
Does it need to be fast?
 
Nope
 
5:25 PM
So you could just use Python's own unpacking methods
 
I'm listening?
 
huh, that works awesome, but I can't get it to capture the entire string
One sec
So close
erm, I flipped the struct order, int comes before all the uints
Not that it changes the size
Wait I'm an idiot...?
Two runs, then
@copy I love you
 
5:45 PM
Neat
 
Unpacking it once without the string, then just getting the length and slicing it up manually
lurv u
 
 
1 hour later…
6:56 PM
happy birthday! @rlemon
 
u wot m8?
 
it's not?
wat
 
yes, yes it is
for a second I confused you with monners
he's ausi
 
I'm aware
 
@Mosho thanks!
 
 
1 hour later…
8:10 PM
and back to here
 
8:20 PM
o/
 
\o
 
8:32 PM
o/\o
 
/\\/|\//\
 
8:48 PM
in JavaScript, 48 secs ago, by ziGi
if you haven't heard it before, that's cause I invented it
 

« first day (21 days earlier)      last day (130 days later) »