|
DaTroof posted:use a git hook ya fuckin pelican How do you git hook for commented-out code? I could specifically use it for C but it's a general question Is there some parsing library for it? I'm sure there is but no seriously
|
|
|
|
|
| # ¿ Jan 13, 2026 05:13 |
|
Corla Plankun posted:python has a ton of things that will return nonzero exit codes if your formatting is bad or contains errors that can be detected with static analysis like unused imports and etc thanks that reminded me that linters exist, and yeah that would work and yeah it's been around for older plangs for quite a while, the original lint was for C e: actually no thinking about it it wouldn't work, it's not trivial to decide which comments are C code e2: the best I can find is a grep for semicolons in comments, which is ehh Private Speech fucked around with this message at 11:53 on Jan 29, 2019 |
|
|
|
gonadic io posted:It doesn't have to compile, just parse Krankenstyle posted:oh yeah even then it's not trivial, macros and defines can be pretty arbitrary maybe it's okay for a quick pass with a simple parser though, false positives are much worse than false negatives for that anyway I might put something like that in our git hook
|
|
|
|
is PHP still horribly poo poo a lot of our (externally-developed) customer web stuff runs on it and it at least -looks- relatively competent they use like two dozen frameworks and typescript and react and stuff but then its php
|
|
|
|
our external actually-passable-PHP devs can't seem to figure out how to make an API consisting of two simple endpoints accept the same input as before after a backend update instead I have to go through a dozen separate deployed C/C++ (ok a few are python) applications where we call the API and 'sanitize' the input into the new format we paid them £20k for the attempt what I'm saying is that I should try freelancing probably e: I get paid a bit over ~£30k a year because European computer toucher wages suck, for comparison Private Speech fucked around with this message at 12:29 on Feb 1, 2019 |
|
|
|
Powerful Two-Hander posted:yeah what the gently caress dude 30k is super low. though tbf spending £££ on offshore people or fixed priced vendor consultants instead of hiring decent people to do the job which provide long term benefits to the company still happens all the loving time because all the accountants see is "resource x is cheaper than resource y" regardless of whether their delivery is remotely comparable. my jobs have varied between £30k and £36k over the years, including for a multinational, though yeah it was outside London I wouldn't even say it's super low, if you look at indeed 30k-40k is the typical wage for non-lead devs outside London, even <30k for web devs e: a fairly typical junior webdev ad outside London looks like this quote:Qualifications or this: quote:Full Stack PHP Developer US folks don't know how good they have it (I'm an embedded/linux dev myself, not PHP, but it's the same just £10k higher) Private Speech fucked around with this message at 13:52 on Feb 1, 2019 |
|
|
|
I only have a few years experience (and a degree) but yeah I dont get why more companies dont outsource to non-metropolitan UK
|
|
|
|
NihilCredo posted:maybe private speech is talking post-tax figures? im not, nor are the jobs ive posted i guess if you go fintech or something you can get more, also racism could play a role a bit maybe seeing as im slav even if my degree and work history is in the uk anyway im not complaining too much, its enough to live on comfortably when paying half the rent id pay in london. I might even be worse off at ~46k in London once london rent and higher effective tax rates are taken into account Private Speech fucked around with this message at 14:57 on Feb 1, 2019 |
|
|
|
Aramoro posted:The gently caress is this? it's a junior position, so it fits relatively speaking and the posting is code for "we want another dev who can do everything for our terrible web business" anyway as I said I do get about £10k more myself and everything
|
|
|
|
gonadic io posted:go checkout the stack overflow surveys, they're probably one of the better sources for all this stuff the UK numbers specifically are going to be skewed by london, which has close to one sixth of the population and probably a lot higher percentage of devs, but is also really expensive but it's pretty good for general numbers yeah
|
|
|
|
DONT THREAD ON ME posted:yeah i know everyone thinks it's the least terrible of the plangs, and honestly it may be, but i've never really liked using it. It's fine as long as you don't try to use it as a full-featured object-oriented language, that's where the type system really breaks down. I don't mean defining container classes and basic things like that, more interfaces and situations where you have multiple types that look very similar and/or complex type hierarchies, at which point even type-hinting every function is not enough (and half the libraries you use probably never bothered with it in the first place, anyway). e: I could do with a language that's basically python but has a more restrictive type system, oh and less reflection that too. Private Speech fucked around with this message at 22:05 on Feb 4, 2019 |
|
|
|
One time when I was working at a company that may or may not have a name similar to LEG I came across a python script which generated HTML by dynamically creating a new class every time you added another tag. I'm sure it looked very elegant from a functional perspective but when I get OOM crashes generating simple reports on a 4GB server you've probably hosed up. I know that's not entirely python's fault, but still. e: oh and the script already used django for some of the backend work, using the templating system was too pedestrian I guess Private Speech fucked around with this message at 22:20 on Feb 4, 2019 |
|
|
|
DONT THREAD ON ME posted:compile time metaprogramming is the only moral metalprogramming funny thing is that they were testing reports for in-house compiler performance which may actually explain it a bit
|
|
|
|
CRIP EATIN BREAD posted:I like how nim does it and gives you access to the AST that is treated and looks like regular code oh that looks really neat, I don't think I've ever looked into nim before even if I vaguely remember the name I might use that for some next thing I'll write Private Speech fucked around with this message at 22:54 on Feb 4, 2019 |
|
|
|
Chalks posted:because someone decided that manually maintaining every single dependency by copying and pasting js files around was bad isn't that more of a package managers job im mostly just glad I don't have to do webdev beyond some very basic things
|
|
|
|
Powerful Two-Hander posted:i walked them through it and in the process got tripped up by the new commit hook that requires an issue ref (added by me) because I was replaying non-compliant commits from like 2 weeks ago owned
|
|
|
|
Boiled Water posted:and yet you see it all the time in a lot of places both have their place, if you need a tight loop with lots of DMA use and rapid timing and digital/analog work going full embedded works better Linux is mainly good when you need to do complex logic, work with graphics, run a server or do other stuff that needs libraries for a reasonable implementation the device I (soon-to-be-used-to) work on has 3 different complexity levels of embedded socs/mcus in it, with embedded Linux at the top e: one example where a low-level mcu is absolutely necessary is analysing NDIR signal, or waveforming ultrasound; or really anywhere where you regularly need sub-microsecond precision. also its cheaper (it's like $0.50 per piece for a typical STM32F0) than a full Linux soc, which matters if you are not doing hobbyist things. oh and uses up orders of magnitude less power Private Speech fucked around with this message at 00:12 on Feb 18, 2019 |
|
|
|
Blinkz0rz posted:dal abstraction layer a dalal if you will
|
|
|
|
id like to say 'i know' but really my eyes glazed over halfway through that post
|
|
|
|
Zlodo posted:never got to use such a language but the idea that poo poo i write later in the code specifies the type of poo poo i wrote earlier feels weird and counter-intuitive a lot of functional programming features can be like that at first, but they are fairly neat in practice have a look at Prolog for even weirder (but related) programming paradigms e: here's a quick c/p from wikipedia: quote:In Prolog, program logic is expressed in terms of relations, and a computation is initiated by running a query over these relations. Relations and queries are constructed using Prolog's single data type, the term. Relations are defined by clauses. Given a query, the Prolog engine attempts to find a resolution refutation of the negated query. If the negated query can be refuted, i.e., an instantiation for all free variables is found that makes the union of clauses and the singleton set consisting of the negated query false, it follows that the original query, with the found instantiation applied, is a logical consequence of the program. This makes Prolog (and other logic programming languages) particularly useful for database, symbolic mathematics, and language parsing applications. Because Prolog allows impure predicates, checking the truth value of certain special predicates may have some deliberate side effect, such as printing a value to the screen. Because of this, the programmer is permitted to use some amount of conventional imperative programming when the logical paradigm is inconvenient. It has a purely logical subset, called "pure Prolog", as well as a number of extralogical features. Private Speech fucked around with this message at 23:31 on Feb 20, 2019 |
|
|
|
AggressivelyStupid posted:now imagine prolog but with lisplike syntax I'm thinking I'll write something with SWI-Prolog for my last week at work they screwed me out of vacation and have me working overtime a lot
|
|
|
|
Jabor posted:if it's your last week, why the heck are you working overtime? I'm not anymore, that's a big part of why I'm leaving I won't actually do it but I'd probably get away with it
|
|
|
|
AggressivelyStupid posted:ctps: I think Fril is going to be the death of me. My mostly liquid brain can't comprehend both logic programming and lisp syntax at the same time. I've had lectures by Martin and Flach, it was pretty great we did fractals in it and stuff, it was the most fun programming I've done at uni and they were really good at explaining it as you'd expect doxxing my uni a bit there it's definitely very academia Private Speech fucked around with this message at 22:04 on Feb 21, 2019 |
|
|
|
Krankenstyle posted:it looks ugly to me and i dont like it you can also do an import guard by putting in an import-scope if i.e. code:StackOF also offers this: code:e: im not primarily a python dev I just maintain a few python things at work so there might be a more elegant solution Private Speech fucked around with this message at 23:24 on Feb 21, 2019 |
|
|
|
galenanorth posted:A site being scraped banned my bot 3/4 of the way through making 4000 requests for the final program run to get all their store locations' data. I tried seeing if there was a way to alter my HTTP headers that I hadn't tried, and I tried learning how to use proxies, but neither worked. It might be best to give up and try scraping the data of another company, put this program on ice, and try again later. I may run into this problem again, though. I suspect the problem is that they've got an anti-scraping tool that blocks all the proxies listed on all the most popular websites which list free proxies. you could try a vpn hosted on some vps provider but it's not the most ethical no
|
|
|
|
I thought tor address space was separate from ordinary DNS? I know very little about it though
|
|
|
|
i've been wondering if unit testing in embedded/kernel/IoT space can be useful, there's an itch to try but when you don't even compile in all of the standard library into the firmware to save space it's fairly hard to design tests which would actually be meaningful and still run on the device and most of the bugs come from a complex interplay of PCBs/firmware/components/third-party software anyway obviously hardware testing/black box testing is important, but that's another kettle of fish entirely e: there's the design verification route of running in a simulator maybe, but I don't know if that wouldn't bring in even more issues than it would solve Private Speech fucked around with this message at 01:19 on Mar 9, 2019 |
|
|
|
cinci zoo sniper posted:i saw a cool demo at local steelcase dealership, they make portable cabins like that. subdued ceiling light, sound-proof door, and a bench with shelf for one person to sit and place laptop on - all interior is some matte black velvet type thing they sell those for east asian kids for studying, it's a thing but somewhat hard to google. I'm guessing it would work okay for programming?
|
|
|
|
cinci zoo sniper posted:the one i “test drove” (test sat???) would be okay for coding in hourly increments, provided your laptop is the only thing you need to work. it’s meant to be a conference call booth for open office spaces, so there’s nothing for long term comfort in it (also, airplane-tier legroom) here's the one I've seen before, maybe it's a bit bigger I'm not sure from you description, it has a few bookshelves and lights and such
|
|
|
|
cinci zoo sniper posted:https://www.ocs-steelcase.nl/en/framery-phonebooth-o I was either in this one or something nearly identical ahh okay yeah that's tiny now that I think about it my university had similar soundproof booths for students to do group work/programming in, they were pretty great e: also Frankfurt airport has these "silent chairs" (demonstration robot not included), but I can't remember if you can close them completely I think I did type out some code there while waiting for a plane connection once e2: pinterest has a huge amount of booths like that Private Speech fucked around with this message at 21:26 on Mar 10, 2019 |
|
|
|
hackbunny posted:C++ doesn't have those, are you referring to making member variables public? kinda but is there any reason besides cargo culting to implement trivial (i.e. not factories and such) getters and setters even in say Java? I suppose if you use an interface type in the signaturee: i've seen python getters and setters used for runtime evaluation shenanigans, but that's not really a good argument in favour Private Speech fucked around with this message at 00:42 on Mar 12, 2019 |
|
|
|
Jabor posted:They give you the option of adding logic later on without needing to refactor callers. I guess it makes sense, particularly when java doesn't let you override member access with a function looking around a lot of people don't like it though, including the isocpp comittee itself, arguing that a) you are breaking encapsulation by exposing members marked private, and b) if you add logic you might want to refactor the callers anyway, since the class could now behave differently than the callers expect (e.g. you fire off an event on modifying some value, but a caller uses it for an algorithm which calls it thousands of times per millisecond) e: here's a summary of stroustrups/isocpp conclusions on the topic isocpp posted:C.131 Avoid trivial getters and setters Private Speech fucked around with this message at 05:06 on Mar 12, 2019 |
|
|
|
VikingofRock posted:Does anyone know if we will be able to overload operator .() in C++20? Because if so, python sortof has this via the @property decorator, but then again python has a lot of things
|
|
|
|
Krankenstyle posted:are read-only class properties possible in python? i can make instance ones with @property but ive been googling a bunch and not finding anything for classes...? you can overload __setattr__, but most of the time you just prepend __ to your property and hope that all your users are well-behaved (they won't be) it depends on what you're trying to do e: I guess the property() function can do what you want better than __setattr__ (it's different from the decorator, you'd put it into class context) e2: as with everything in python, it's terrible Private Speech fucked around with this message at 12:15 on Mar 13, 2019 |
|
|
|
cinci zoo sniper posted:https://www.theregister.co.uk/2019/03/28/hcsec_huawei_oversight_board_savaging_annual_report/ lomarf This is a fun part: quote:In the first version of the software, there were 70 full copies of 4 different OpenSSL versions, ranging from 0.9.8 to 1.0.2k (including one from a vendor SDK) with partial copies of 14 versions, ranging from 0.9.7d to 1.0.2k, those partial copies numbering 304. Fragments of 10 versions, ranging from 0.9.6 to 1.0.2k, were also found across the codebase, with these normally being small sets of files that had been copied to import some particular functionality.
|
|
|
|
Soricidus posted:I bet the chinese backdoors are there and the uk government is just pretending it didn’t find them so it can exploit them too Well for one thing it does say that they're not sure if the source code they have is actually all that gets compiled because they don't have everything they need to build it. On the other hand I'm sure they've kept some vulnerabilities back for themselves anyway.
|
|
|
|
Sagacity posted:ah yes, the developer who is "obsessed with performance" and will happily write a bunch of horrible code to make everything more efficient is it actually any faster though I'd assume there's l->r evaluation for anded conditionals but maybe that's not a thing in angular, maybe, too lazy to look it up
|
|
|
|
prisoner of waffles posted:i love every one of luigi's horrible ideas. next step is clearly to get your n64 running a server with an objective-c based web framework I once spent two months improving a J2ME emulator running in PPSSPP (PSP emu). It was the best J2ME emulator I found and it did sortof help me run some old phone games on x86
|
|
|
|
macros are great for embedded stuff bit janitoring too, most manufacturers supply macro libraries for dealing with peripherals and whatnot meaning you can write something like this without function call overhead: code:
|
|
|
|
|
| # ¿ Jan 13, 2026 05:13 |
|
Oneiros posted:last time i installed/ran our front-end service locally it was over two gigs on disc and the npm dependency list was over 1000 lines long. it takes about five to ten minutes to bootstrap and basically makes my dev machine unusable while doing so. what uhh, what does it .... do at least in general terms
|
|
|




