« first day (1922 days earlier)      last day (3024 days later) » 

12:06 AM
The notation is really old. I know it was in C, but it's probably older.
 
@QuestionC yes but PHP fucked it up :d
 
What does it mean in php?
 
it is the same, but associativity is worng
so if you write a ? b : c ? d : e
 
Or are you encouraged to use like.... ((cond and a) or b) or something like that?
 
in C that means a ? b : (c ? d: e)
in php it means (a ? b : c) ? d : e
so you cannot chain it
 
12:11 AM
That is a really unfortunate choice by php.
 
just standard
didn't they consider using :) as the namespace separator
$think:)about:)the:)joy:)of:)programming:)PHP
 
i fnally did it and it works
now, i am going to sleep and instead of going on a tirade that yields me a ban, can i please gently get kicked out of the channel ?
 
12:25 AM
stackoverflow.com/q/34889280/400617 duplicate of either link in the comments
 
Lol so I'm reading that pep0505.. and can't help but giggle everytime I read: The 💩 operator
pile of shit operator?
 
code smell
 
DSM
12:56 AM
@davidism: one week until we can visit the island!
 
1:13 AM
woo
 
1:46 AM
and I know some guys (a guy) who are (is) trying to replace it...
so maybe the point is moot
survival of the fittest, I guess.
so what's up?
 
2:17 AM
Looking through that MIT link you had posted earlier
 
2:53 AM
What's the best way to store "ranges" of distance?
 
In what context?
 
As in, thing A is roughly at coordinates. You need to store a specific amount of area it covers
Not necessarily perfectly circular either
 
3:14 AM
@corvid Most generally, you would store a list points (or other encoding) representing a polygon.
But that's probably too general for whatever you're trying to do. What are you trying to do?
 
Basically, break a city down into "districts" then do searches within those districts for entities in the database (geolocation/geocoding stuff)
Eg, search within (roughly) the North End of Boston for any store having "pizza" in its description (a lot)
 
Given that districts are weird shapes, you'll probably have to do polygons. PostGIS is good at this.
 
Ah that looks perfect for this project, thank you for the help
 
4:00 AM
@davidism I've actually always wondered if this is the correct approach - by using polygons you lose a lot of information that you have to store otherwise. Mostly information about neighbours.
While before you broke the data (districts on a map) up into separate polygons, the positioning of these data on the global map already dictated the neighbours...
 
I don't know what you're referring to with neighbors. If you don't store shapes, you don't have an area.
 
I've been wondering this for pathfinding, where people often use convex meshes to represent the world, but then instead of using the mesh-geometric data. They basically consider the "polygons" simple points with connections..
 
I still don't know what you're talking about.
 
If you have polygons parameterized by coordinates, you can still derive neighbor data
 
yeah
 
4:05 AM
Hmm I'm really interested in this, but it's 5 am, and I can't keep my eyes open
If I remember tomorrow I'll show you a drawing that shows the "problem" often occurred in mesh-based pathfinding algorithms. (Biggest problem is, when the thing moving around is no longer a point, but also has a size, and hence can cross into multiple polygons at once while cutting corners).
 
people take so long to think in hearthstone :|
 
@paul23 that has literally nothing to do with what corvid was talking about.
 
Although, to be fair, my questions are usually very badly worded
 
Hey guys! Anyone here use vim? I'm having trouble finding a YouCompleteMe for py 3.5... It only supports >=2.7 && <=3.0
 
Use PyCharm.
 
4:20 AM
@davidism That's what I used previously - it's really nice! I just want to use a single text editor though.
 
Use Atom.
 
Apparently atom is really slow, so I never gave it a try
(and no I won't use emacs)
 
OK
 
Atom is fast actually
 
@corvid Oh really? :o I would then use it but I've already gotten accustomed to vim so it's kind of hard to change
 
4:21 AM
you can get vim key bindings for atom I'm pretty sure
 
Yep, I just did this crazy thing called an "Internet search" and you can.
 
@corvid I suppose, but right now I'm looking into how to add more plugins for my vim :P maybe I'll try it later?
A plus side is that vim is installed on all lnx servers and I can ssh and use vim freely even though there might be no plugins
 
You could use janus for vim, it's bretty gud
 
@corvid Heyy nice! Actually I already have about half of these :) I think I'll look through it and download whatever plugins I don't have still
but so far I googled andhaven't found anything really rewarding in terms of python 3.5 YCM integration
 
If I have to do more than what nano can do on a server, I've messed up. But you can also mount an SSH session with sshfs and just edit everything using a local editor.
 
4:31 AM
@davidism oh - it's for my college classes right now
UCLA has linux servers that have weird packages and outdated lnx distros it's sort of strange. Also never used nano before, how is the experience?
 
incredibly simple, because I want to do as little editing on a remote server or in the terminal as possible
anyway, if you can ssh in, you can mount with sshfs, nothing needs to be done on the server
that's exactly what I did at ucsd
 
what is ucsd?
 
University of California, San Diego
it's where I played ultimate for 4 years and also did some computer stuff
 
Nice! I didn't know there was such a thing as sshfs
Why no love for the terminal? I've learned to love it ever since I had to take the stupid bash/python/c scripting class
 
user559633
What do you mean by a terminal? e.g. vim or emacs?
 
4:38 AM
Because the terminal is incredibly restrictive to work in. Are you seriously doing all your development for class on a remote terminal?
 
user559633
I heard that your code gets covered in nerd-cred dust if it's more inconvenient to write.
 
I run my vim on the terminal because tmux allows for tiling
I also do all my development for my side projects on the terminal too :P
 
user559633
@AaronHall Like a youtube playlist or something? Or a GH static page with links? :)
 
@tristan since you're into RLM, I just discovered Every Frame a Painting which analyzes film techniques. I've been watching it all night.
 
user559633
@davidism Checking one out
 
4:46 AM
Check out the most recent one, I suddenly want to watch Korean crime movies.
 
user559633
It's fun to watch these kinds of analyses and then parrot the arguments -- my girlfriend thinks I have some idea of what I'm talking about with movies. If she watched RLM stuff from back when Cracked was good, she'd realize I'm just making observation meatloaf
 
Some day, we'll have people analyzing the code style of famous developers.
Code is art, guys.
 
user559633
5:01 AM
 
Quick Python question: what is the python equivalent of Java's var++ or var+=1?
 
var += 1
 
what. I tried that
I got an exception
Hold on. Lets do that again.
 
user559633
did you believe in yourself when you tried?
 
no not really.
LOL
 
user559633
5:02 AM
oh, well there's your problem
 
user559633
>>> my_var = 1
>>> my_var += 1
>>> my_var
2
 
working.
 
user559633
if you hadn't previously initialized my_var to something, you'd get a NameError.
 
Thanks. That just saved me 1 byte for code golf.
 
@tristan yeah, but that's your var, what about mine?
 
user559633
5:03 AM
@davidism well, thanks to antiquated laws, half of that var doesn't even really belong to me
 
user559633
or the second thing i think of that's actually amusing
 
user559633
>>> your = "my_"
>>> eval("%svar" % your)
1
 
user559633
there, now we're sharing without really sharing
 
5:48 AM
Cbg
 
hi guys, does anyone have a > 200x200 SO icon on a transparent background?
 
6:19 AM
Cbg all.
@inspectorG4dget vannakam ji.
 
6:40 AM
Vanakkam, vandanam, suswagatham
 
 
2 hours later…
8:12 AM
Hey up all
 
Hello guys!
Maybe anybody knows how to mock the class instance in post method in class-based view of django-rest-framework?
 
8:41 AM
Hi guys
 
Hello.
 
Using memcache in django project bt it gets full and gives half result only sometimes.
I found commands to clear cache but can i schedule them to clear cache daily?
commands are :
telnet localhost 11211
flush_all
quit
 
9:07 AM
I feel like I am programming in C. core gets dumped every time
 
9:17 AM
Mornin' cabbage
 
Sup Brit
 
Sup turds
 
That's politeness for you
 
:D
I'm very tired and this is funny
 
@kishan Can't you just cronjob that?
 
9:39 AM
Cabbij
 
10:04 AM
bonjour my fellow cabbages
 
cbg(["jrs", "ian clark"])
 
How are tricks today?
 
@IntrepidBrit ok thanks will try
 
10:20 AM
JRS: Tricky.
 
I'm running a server application with a while True loop that waits for connections. I want the process to die when I close the terminal, what's the standard way of doing that in python?
 
Intrepid: I know that feeling.
@HjalmarZ That would be normal behaviour if you started it from the terminal, but it's outside Python. Have you a little more context (particularly an MCVE of the unwanted behaviour I presume you are experiencing)
 
D3 day! \o/
 
while True:
client_connection, client_address = self.listener.accept()
request = client_connection.recv(4096)

if request:
buffer.put(request)

client_connection.close()
 
Diablo 3?! Nice one ;)
 
10:25 AM
Woohoo! Why is it D3 day?
Either version sounds good
 
I've got a fantastic D3.js bug to solve. It might well defeat me and render me insane due to its sheer complexity and annoyance.
 
That's what the producer thread is doing.
 
Nice
Anything we can help with?
 
Bobby your very existence is all the help I need.
 
Then I shall continue to exist
 
10:29 AM
host, port = '', 80
listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
listener.bind((host, port))
listener.listen(5)

this socket is initiated at startup. If I close the terminal and try to run the program again I get a message saying that the port is allready in use
 
pulls out a cricket bat Where's your new place Bobby?
 
and i'm forced to restart my vm if I want to run again
 
@HjalmarZ So let me get this straight. You initialise the port at OS start, but you want the program to quit gracefully on a terminal exit?
 
@IntrepidBrit bring it! Also, it's in... Cheltenham? Just follow fizzy's phone signal!
 
@HjalmarZ Will client_connection.close() ever get called...
 
10:31 AM
I'm high on Lemsip. I've got Jimi Hendrix on. I've got an epic bug to fix. Truly the day cannot get any better.
 
@JRichardSnape Yes, the indentation is messed up...
@IntrepidBrit I'm 100% new to linux and Python. What do you mean OS startup? I run the socket init when I start my application...
 
@HjalmarZ That makes more sense.
 
@Ffisegydd D3 Lady ♪ ♫
 
I prefer to think of myself as the D3 Whisperer.
 
Let's set up a consultancy called D3 Kings
Got a Christmassy feel
 
10:36 AM
@HjalmarZ So why do you want it to quit on a terminal exit? Seems a bit unwise to me, simply because if something goes wrong with the code - you won't know about it and/or be able to control the problem. You're better off ensuring the code exits prior to closing the terminal.
 
@IntrepidBrit Yes, sounds like a good idea. Can I use raw_input to kill the application once the user sends something back through the terminal? Like I said, 100% noob here...
Or are there any other ways to tell the application to stop?
The application is supposed to run 24/7 and I will rarely kill the process once it's up and running. It's super slow to debug and test if I have to restart the vm everytime I want to run a change. If there's a hack solution to kill the process then that would work just as well.
 
As always: depends on your application. If you really want to get your teeth stuck into Linux, one of the principles you're going to have to get used to is running a "daemon"
Which means the code will be able to run 24/7 without needing to keep a terminal open, or whatever calling process running your code alive.
From there, you could implement something in the stop part of the daemon to elegantly shut down your code
Another alternative would be to receive a "death" message via the data you're sending (ie - connect locally and send the death message)
 
@IntrepidBrit Interesting, I tried running the application through a .sh file and that made it run without the terminal. Does that count as "daemon" or are there dedicated patterns/tools for creating a daemon service?
 
As for hacky solution - there's a number of tools available to you. I used to use the tcpkill command
That should close the required port (as long as your original process is dead)
 
A death message sound interesting
 
10:50 AM
@HjalmarZ How did you execute .sh without terminal. Through the file manager?
 
@khajvah check the box under properties
 
BTW, you can execute an application through terminal which won't close after you close the terminal.
 
Eurgh. Nohup. Poor man's daemon ^^
 
Yuck indeed
 
:D
 
10:54 AM
@HjalmarZ Should be pretty simple to process your inputs and check for a specific pattern.
Problem is - unless you somehow autenticate the connection, anyone and their granny would be able to troll you and kill your program
 
@IntrepidBrit Yeah, on second thought that might not be a good solution...
 
I think it's conceptual stuff you need to get used to, @HjalmarZ. Your python program will be stopping when you close the terminal (unless you've nohup'd it). But at the OS level, the port is still in use, because you've not released it, you've just brutally killed your process wherever it was by killing the terminal
So - what Intrepid is telling you is a proper way to do it. Running your code as a daemon and then sending it some kind of signal to stop, so that it can stop gracefully, closing connections, sockets, ports etc.
Having read one of Intrepid's comments now, I'm intrigued by the thought of streaming death metal to a port to kill it...
"Connect locally and send the Death Metal"
I have honestly been sent an email inviting me to a talk entitled "How to spell 'success' everywhere in the world". They really do not want me there.
 
Fixed my bug. Twas an epic battle involving 1500 lines of D3.js code.
 
D3 is annoying
 
@JRichardSnape Ok, I'll look into turning my application into a daemon service then. Thanks for the tips!
 
11:04 AM
D3.js is fantastic.
 
I'm on board. Let's make Python great again. Introducing: TrumpScript! devpost.com/software/trumpscript
 
@JRichardSnape I think I would prefer to send it some MSI - "Shut me up"
@JRichardSnape Have you sent them a list yet?
@HjalmarZ You're welcome. Good luck!
@Ffisegydd How many lines remain?
 
@IntrepidBrit I was tempted. Or to sign up for the talk and print out the word in as many languages as I could and stick them up all over the room.
@IntrepidBrit 1501 lines - he must be doing something wrong ;)
 
He's a collaborator!
 
11:20 AM
"As the undeniably best presidential candidate in the 2016 language" - was that meant to be 2016 election?
 
> But most importantly, Trump doesn't like to talk about his failures. So a lot of the time your code will fail, and it will do so silently. Just think of debugging as a fun little game.
Presumably they won't acknowledge then that there is an error in that sentence.
 
True :)
Although the authors might be indicating that while liking Trump may mean you're stupid, disliking him doesn't mean you're not :)
 
Cabbage
I just posted a GIF anim over on SE.Mathematics (and the Python code used to produce the frames), which should cycle continuously (at 1 frame/second), but it stops on my oldish Firefox 29.0.1. Is that an imgur issue, a Stack Exchange thing, or do I just blame my browser? :)
 
11:40 AM
Cabbage!
 
11:52 AM
@MartijnPieters Is there any way to rename a tag? Or is the proper way to resolve this by creating a new one and then moving all the old questions manually to the new one?
 
@PM2Ring It got to frame 98 and stopped for me. But I may have miscounted - it probably got to the last frame. When I hover over it, I get a little rewind button and a pause pop up. That implies that it's something imgur overlays IMHO
 
12:07 PM
In my django app I have 2 models. For 'jobs' and 'proposals' respectively. Jobs has a foreign key of proposals such that jobs can either have a proposal 'attached' to them or not. I want to get a list of all the proposals that don't have jobs attached to them. THoughts on how to make that query?
 
eh.. that should read proposals that aren't attached to jobs
 
Thanks, Richard. I don't get a rewind button or anything like that. The cursor changes to a hand (to indicate that the image is a link). If I click it, the image opens in a new tab, but it doesn't animate. However, the favicon of the image in the new tab does animate.
 
django orm is a joke
I am trying to google but I cannot find anything :D
 
Ah - I've just realised that the buttons are from the "Toggle animated GIFs" add on that I installed the other day. So I don't know why your GIF doesn't loop.
 
12:11 PM
Also, this would be used in a not a traditional query but my forms.py to limit the choices of a drop down so that people can only assign proposals that aren't assigned yet
 
aarrgggg not another ORM rant! Have mercy on our eyes ;)
 
14
Q: In a Django QuerySet, how to filter for "not exists" in a many-to-one relationship

Koliber ServicesI have two models like this: class User(models.Model) email = models.EmailField() class Report(models.Model): user = models.ForeignKey(User) In reality each model has more fields which are of no consequence to this question. I want to filter all users who have an email which starts w...

@JRichardSnape well you cannot really rant about it :D
 
@AnttiHaapala Me personally, no, I just whisper to the butterflys and my raw SQL appears.
 
it is like debating about the nutritional value of chewing gum
 
12:13 PM
@AnttiHaapala django orm is a joke
 
I see we're all getting in early before davidism appears...
 
@AnttiHaapala, thanks for the link, reading now
 
@clickhere if you ever have a chance, please use sqlalchemy instead. these kinds of queries are well-documented in the official documentation, with comprehensive code examples :D
 
is this something that could be integrated into django?
 
no
 
12:16 PM
no, nothing sensible can be integrated with django and vice versa :d
 
I have had a real headache trying to talk to Windows printer notification API through ctypes and register a callback. This is also like trying to derive nutrition from chewing gum. I think I might give up. Although there remains a small part of me that does not want to be beaten.
 
Django is like apple of frameworks.
 
@clickhere it required a complete fork... every single file or so had changes,
and then it wasn't "compatible" with django so of course it didn't gain traction
 
Ah, I'm still a complete noob at django and want to get a decent handle on web dev in general before adding another thing that I'll have trouble just installing.. i've made a mental note of it
 
no need to worry about it then :D
 
12:18 PM
@clickhere It's fine. Use Django with its ORM.
It is functional enough for most applications.
 
at some point if you're banging your head against the wall about django, even slightly, it might be just because django sucks
 
What is the industries consensus towards django? or what about ruby on rails/node.js?
 
@AnttiHaapala Have you seen the talk "Why Django sucks" ?
bretty gud
 
which one of them? reitz?
 
12:21 PM
W.T.F. stackoverflow.com/a/34899894/2301450 Probably a sockpuppet... That answer was accepted.
 
Don't they always have a why django sucks?
 
@vaultah Looks like Yahoo answers
 
Is there more criticism of django than other similar packages?
 
No, just the Django community encourages having a talk like that every year I thought
 
12:23 PM
@clickhere other kind of criticism against others...
 
the biggest problem with django is no server push functionality
 
anw, as a noob django is better than PHP :D
 
it is a must nowadays
 
I am not using server push
 
what's the gold standard for web dev languages/frameworks?
 
12:25 PM
for me the biggest problems are a) you need boilerplate but it is not generated for you, b) templating system is slow and ugly and stupid, c) orm is absolutely horrible
on plus side you have the admin interface, but if you use it, then you also need to use the shitty orm.
I need to do reports. Lots of them. In SQL.
 
@AnttiHaapala I ended up ditching server-side templating.
SQL is fun. I like writing SQL.
 
I don't :D I am still using it, rather render fragments of HTML and put them in place with javascript
well, rather a mix
 
it would be great to have an identical templating solutions for the front end and the back end. Just like in Node.js
 
I almost have...
but only almost
 
yeah, but you don't render in front, right?
 
12:28 PM
@clickhere Just for an alternative voice from the wilderness - I quite like Django. But I wouldn't recommend it for starting out.
 
@vaultah At least I got that guy to delete his second "answer".
 
no, I also have a front-renderer
@IntrepidBrit on the contrary, one must start with django, but also stop using it at some point.
 
Very good :P
 
This is getting rather confuscian
or should that be confusing?
Anyway - lunch time in Leicester. Rbrb
Hmm - I made the mistake of leaving that question open. Free Not an answer flag @vaultah. Possibly someone needs to have a word - good job @PM2Ring is even headed
 
12:33 PM
@vaultah Yeah. :facepalm: I just flagged it.
 
Me too
 
is exceptionally bad today :(
 
this one, I have javascript compiler but it requires that you write javascript in embedded code.
but I've thought about doing python ast->javascript translation :P
 
@AnttiHaapala I have one question. How do you send rendered html to the client?
just raw html in the HTTP body?
 
12:36 PM
yes
for that solution
 
I have a REST API but I want to do some of the rendering on the server.
I wonder how it will integrate with JS framework
 
That is, if not using client-side rendering. I've got lots of included templates and such, I can use fragments to render some parts.
 
Yeah hybrid solution seems to be the winner of "client vs server rendering"
 
well, I am pretty much using only jquery, bootstrap, requirejs myself because I need to use diverse set of components, which wouldn't play well with some more advanced anw.
 
I might end up extending Backbone for a clean solution
 
12:40 PM
for example, 1 page is using dhtmlx.com/docs/products/dhtmlxGantt this
 
@AnttiHaapala. So i've read over this link and I don't think this solves my problem. Each job has a proposal field which is a foreign key for proposals. They have kinda the opposite in this example. Where analogously the have each proposal having a job field.
 
oh I see. Not using a framework can be very flexible
qt charts
 
It's like I'd need to query all the jobs. And then loop through them to build a list of all the proposal numbers associated with each job. And then exclude that list of proposal numbers from my drop down
 
@clickhere Write an SQL. I don't think you have to use the ORM.
 
12:48 PM
@The6thSense, that's really insensitive.. /sarcasm
 
Why ?.
 
@khajvah, I definitely don't know sql. performance wise, how bad would it be to do it like I'm leaning towards with a loop?
 
@clickhere depends on number of jobs. But I am sure, you can do that with ORM. Just try more.
 
@vaultah: The guy who wants to parse a dictionary has just done an edit, so now we can see his real data. stackoverflow.com/questions/34898816/… But I think it's now Too Broad.
 
@khajvah. this seems to work :-\

jobs = Job.objects.all()
all_props = Proposal.objects.all()
used_props = []
for i in jobs:
used_props.append(i.propNum)
aval_props = [x for x in all_props if x not in used_props]
 
12:59 PM
@clickhere well yeah but it's as inefficient as it can get
 
I think it'll have to work for now as I'm in a kind of proof of concept stage.. to be improved later I guess. Though, it really shouldn't be handling more than a few hundred jobs ever
 
Cbg
 
@clickhere I suggest you write a "TODO:something" as a comment as you are gonna forget about it in a few days.
 
will do
 
@PM2Ring yep, already voted :P
 
1:18 PM
How might you all approach this problem: stackoverflow.com/questions/34881026/…
 
Just saw someone compaining about SO in 4chan.
> CuckOverflow attacks and downboats me every time I ask something. What's the point of this elitist circlejerk if they won't even help beginners with coding?
 
Lol
Nice responses there
 
responses that would get you banned from SO.
 
1:38 PM
I like the homophonic misspelling "downboats"
 
cbg
i need some help with nyc turnstile data set? any body have any idea how to approach
http://pastebin.ca/3341823
the problem set..any help would be appreciated
 
@poke Create a new tag, then a synonym from old to new.
We can then merge the tags, which effectively replaces all the old tags with the new.
 
Hi there
 
@Martijn Is that the recommended practice for that? I.e. can’t you just rename them from the start?
 
I can't rename them from the start.
 
1:52 PM
Okay, so I’ll just create the tags I mention in my answer here then.
Creating tags means using them in questions, right?
 
if there is someone with Numpy experience, could you have a look at (stackoverflow.com/questions/34896728/…)? Thanks in advance :-)
 
Morning cabbage.
 
can i not do this: form.fields["propNum"].queryset = aval_props
where aval_props is a list?
i'm getting : Exception Value:
'list' object has no attribute 'iterator'
 
(@Martijn waiting for a quick yes/no/abort reply ;) )
 
@poke yes, you'll need to use the tag on a post. That'll bring the tag into existence.
sorry, loads of signals from different directions. :-)
 
2:00 PM
Alright, then I’ll just edit a random post to start :) Can I ping you later to perform the merge, or should I wait for the meta post to get enough attention?
 
ahh looks like i just needed:
form.fields["propNum"].queryset = Proposal.objects.exclude(propNum__in=aval_props)
 
My first raytracer output :-)
 
I thought it was a laser cutter mask for creating a pinhole camera
 
@Kevin it's beautiful
 
This one's a bit more recognizable as a depiction of a scene
 
2:04 PM
@poke: trying to find a post; I think Shog or Tim Post gave guidelines on how to handle tag merges / renames / etc. on Meta.
 
Okay, then I’ll wait before I press save :)
 
It took me 30 minutes to come up with an O(1) line segment / sphere intersection formula. Then it took me 90 minutes to notice I missed a "2*" for one of the coefficients.
 
@MartijnPieters I’ve found this, which mentions that you can actually merge it without an existing target (which has the effect of renaming it): meta.stackexchange.com/questions/87437/how-to-rename-a-tag
 
Now to remember/discover plane/line intersection. I want a floor for my balls.
 
It's called a chair
 
2:07 PM
@poke TIL
 
:D
 
I did not know that :-P
 
Will merging tags automatically create synonyms for the old names though?
 
I think postgres is the only db I've used that seems to have a well-documented solution for everything
 
I think meta.stackoverflow.com/questions/250933/… applies re. meta posts.
@poke It will.
 
2:10 PM
@corvid finally got rid of mongo?
 
@Programmer Nah, required to use mongo for work (don't get to make technical choices), but for my personal little project, I went with postgres
 
@Martijn Ok.. tell me what to do xD
I could press save now to create those new tags.
 
@poke read the When can I actually start with the burnination? When is it 'approved'? section.
If you feel there is enough support, then I or another moderator can do the merge.
 
Well, it’s not a burnination, it’s a rename of tags related to actual products that got renamed by Microsoft. So it’s not really something that needs to be discussed much (imo).
 
Hmm, I am writing a function line_plane_intersect that finds the intersection of a line and a plane. Possible results are: there is one point of intersection; there are no points of intersection; there are an infinite number of points of intersection. What should the return value look like in each case?
I didn't have this problem in line_sphere_intersect because that can only return 0, 1, or 2 points
maybe I could return a tuple whose first item is the number of points of intersection, and the second item is a collection of those points iff there are a finite number of them? And None otherwise?
Yeah that works.
Crunchberries floating in milk at night . png
 
2:26 PM
mmm tasty
 
I recently discovered "full-text search" of postgres. It is holy.
 
cbg, all
 
cbg Marcus
Anyone know how to flag sock puppeting for votes (I presume)? See that question @vaultah posted before? Someone has noted it has a word for word copy and - surprise - the asker on that one is the answerer on this!!
 
2:46 PM
There's no way to catch/handle exceptions in list comprehensions right? (Apart from creating an extra utility function/lambda)?
 
Yeah.
 
You're not using comprehensions for their side effects, are you ... ?
 
now using sum(m.getChargeRate(distance) for m in self.modules if hasattr(m,"getChargeRate")) - it follows python's paradigm for generators etc. But it doesn't follow the paradigm of EAFP..
And actually above paradigm quite often happens when going "generic", instead of depending on "strong" typing. (if it looks like a duck.....)
 
You were hoping to do something like sum(m.getChargeRate(distance) for m in self.modules and then deal with the exceptions where it didn't exist?
 
@JRichardSnape well mostly skip them, skip the modules that don't have a charge rate...
 

« first day (1922 days earlier)      last day (3024 days later) »