|
Shaggar posted:you can create maps like $aThing = @{ SomeProp="fffff", whatever="guuuuhhhhh" } and then $aThing.SomeProp or $aThing.whatever. I haven't done much diving into the syntax cause I was doing something pretty simple. Also, if you specifically need a PSObject for some reason: New-Object PSObject -Property @{SomeProp="fffff"; whatever="guuuuhhhhh"} In Powershell 3 you can also cast to a pscustomobject: [pscustomobject]@{SomeProp="fffff"; whatever="guuuuhhhhh"} So it should be safe to use the latter syntax by the year 2025. Of course, by then everyone will probably be using something instead. I kind of like powershell but it has too many warts and having different stuff in different versions on different computers (and different os versions since lots of the commandlets aren't even part of the actual language!) is a pain. Microsoft has too many languages and they probably should have tried to make c# work for scripting instead. mystes fucked around with this message at 20:41 on Dec 5, 2015 |
# ¿ Dec 5, 2015 20:37 |
|
|
# ¿ May 10, 2024 16:37 |
|
MALE SHOEGAZE posted:lol it's like they made objective-c flavored bash but it's still just as bad as bash Powerhell is pretty powerful, and I feel like I can use it in situations where I would be reaching for something like python on linux. On the other hand, a lot of stuff is still way to verbose, and it still has a lot of gotchas. Also, if you write something sufficiently complicated it's like you're ducktaping different weird Microsoft programming ecosystems together (.net, COM, WSH, the cmd interpreter, mmc, probably other stuff), to the point where it might get easier to just write it in some other language directly (it's easy to end up literally having to embed c# code in your powershell script for COM and .net stuff, or even writing what's effectively an IDL file embedded in c# in powershell). This may be because I keep using powershell for stuff it's not really intended for, just because it's preinstalled everywhere now and has an interpreter, though. It mainly seems to be officially billed as a language to automate system administration tasks, rather then the default tool for everything, like bash on linux. mystes fucked around with this message at 20:55 on Dec 5, 2015 |
# ¿ Dec 5, 2015 20:46 |
|
BattleMaster posted:sums up visual basic pretty nicely and i am still mystified as to how it ever achieved any level of professional use Edit: Beaten. Also, in the late 90s/early 2000s, the attitude of people online was like, "Visual Basic is bad because it makes programming too easy " which is completely insane in multiple ways. mystes fucked around with this message at 14:10 on Apr 10, 2016 |
# ¿ Apr 10, 2016 14:07 |
|
Toady posted:what even is the point of go
|
# ¿ Jul 11, 2016 12:28 |
|
Valeyard posted:you can write a flask-restful python app thats like 15 lines long that acts as a proxy, so instead of hitting site.com/whatever/ you hit locahost:5000/whatever/ mystes fucked around with this message at 04:26 on Jul 27, 2016 |
# ¿ Jul 27, 2016 04:24 |
|
kalstrams posted:thinking about trying to write a simple rpg game to check out a new language. c++, c#, or java - thoughts?
|
# ¿ Jul 28, 2016 05:48 |
|
VikingofRock posted:Changes between Rust versions are very minimal though? Usually it's just a few stabilizations of methods in the standard library. Edit: Oh, I guess that after they released 1.0 they stopped doing stuff like that? mystes fucked around with this message at 06:10 on Jul 28, 2016 |
# ¿ Jul 28, 2016 06:05 |
|
Skim Milk posted:Haskell prelude: what is a string but a list of characters?
|
# ¿ Aug 24, 2016 02:25 |
|
JawnV6 posted:hi, im putting things in a text file for humans to read LordSaturn posted:IIRC MS Word has an XML format you can write. I have done this for Excel, it's idiosyncratic but not the worst Depending on your requirements, you are probably much better off simply generating html for the browser though. I had a particular, stupid reason why I wanted to use word. mystes fucked around with this message at 12:34 on Sep 1, 2016 |
# ¿ Sep 1, 2016 12:31 |
|
LeftistMuslimObama posted:have you looked at the structure of them? not only is every aspect of the document extracted into its own separate xml file within the zip, there can be arbitrarily many of each type of "xml piece". you can end up with 8 different xml files all with tracked changes or comments in them and with range ids jumbled up between them. you can get some absurdly nested codes in that xml too (tracked changes over tracked changes over tracked changes).
|
# ¿ Sep 1, 2016 22:16 |
|
hobbesmaster posted:do you have word installed? is it activated? is there a word window or dialog hiding somewhere after that open call? There are tons of reasons it could have problems, though. I'm not sure if it's smart enough not to try to display dialog boxes if you run it from interop and/or it's invisible, so if there's some sort of issue with the file you might have to set Application.DisplayAlerts appropriately to ensure it doesn't try to display a dialog box to ask if you really want to open the file. It's going to be hard to get office com interop working 100% reliably, at least if you have to work with arbitrary files. mystes fucked around with this message at 20:37 on Sep 2, 2016 |
# ¿ Sep 2, 2016 20:31 |
|
This behavior isn't at all surprising outside the context of python. Any language that has a way to pass a value to fill a list or array is going to have a problem with object references unless the array/list constructor deep copies the object by default. This is the biggest problem in Javascript, because the Array constructor specifically encourages you to make this mistake, but other languages that allow you to easily combine copies of references will have this problem to. In terms of other plangs, I just checked powershell actually has the exact same multiplication syntax with the same problem, although ironically its horrible automatic flattening of lists actually means you have to be really emphatic about keeping nested lists to have this problem. The main problem in the case of python is that this syntax is actually considered the idiomatic way to make copies of lists of values (e.g. strings) in python, which is dumb considering this pitfall. The smart languages simply don't provide any obvious way to pass a single object to initialize an array/list, which at least makes it more likely that people will at least accidentally instantiate multiple copies.
|
# ¿ Sep 7, 2016 02:42 |
|
Captain Foo posted:finding out that python robobrowser doesn't do javascript at all was p fun
|
# ¿ Sep 9, 2016 18:37 |
|
fritz posted:why arent corporate it questions allowed
|
# ¿ Sep 14, 2016 16:51 |
|
Captain Foo posted:it's good tho Basically it's a complete mess that copied dumb antifeatures from unix shells. It may actually be worse than JavaScript in terms of making me hate dynamic typing. The only good thing is the pipeline, but it's incredibly verbose and annoying just to define a function that takes input from the pipeline. Linq is better anyway. Microsoft really should have tried to make c# or f# convenient to use as a scripting language instead.
|
# ¿ Sep 30, 2016 02:46 |
|
Sapozhnik posted:I refuse to use a non-IDE dumb text editor that consumes 400 odd MB of memory just on principle Soricidus posted:so basically it's emacs but with javascript instead of lisp?
|
# ¿ Oct 15, 2016 02:57 |
|
Shaggar posted:still better than javascript
|
# ¿ Oct 26, 2016 03:34 |
|
Soricidus posted:han unification is fine. we wouldn't do it today, it was kind of dumb to try to restrict unicode to 16 bits, but now we've got it it really isn't a big deal. after all, the only reason it was ever able to happen in the first place is because nobody in china, japan, or korea had ever previously wanted to distinguish those character shapes in the character sets they created for themselves to use. it only causes problems in cases where it is very, very important that a character should have exactly the right shape, but you are somehow restricted to plain text without the ability to specify a font or language. Just because there is a correspondence between the Chinese and Japanese versions of the characters doesnt mean that showing the right version is some sort of bikeshedding, and if you think it's only white people who are annoyed when the result is incorrect you have no idea what you're taking about. In theory software should be able to use information about what language is displayed to fix this, true, but the reality is that this has not turned out to have worked in many cases, and this problem would never have occurred of it weren't for the han unification.
|
# ¿ Oct 27, 2016 13:19 |
|
MrMoo posted:Presumably like the word language: Japanese top and Chinese below Characters like 直 and 誤 look different but I'm on my phone and can't easily create an image showing both Chinese and Japanese versions.
|
# ¿ Oct 27, 2016 19:24 |
|
LeftistMuslimObama posted:i think the thing i hate most is that delete(obj.prop) completely removes the property from the object so in won't find it unless the prototype also has a copy of the property, but delete(arr[index]) will not completely remove the index and shrink the array to the previous index if it's the last one but will instead just change its value to undefined, forcing you to be all fucky with splice if you want to actually remove indices from the array.
|
# ¿ Oct 27, 2016 23:04 |
|
Oh, delete is an operator, not a function. Of course.
|
# ¿ Oct 27, 2016 23:11 |
|
VOTE YES ON 69 posted:print line debugging is an art, and the hallmark of an excellent programmer who needs no fancy tools to aid them
|
# ¿ Oct 27, 2016 23:30 |
|
CommunistPancake posted:https://github.com/Jasonette/JASONETTE-iOS
|
# ¿ Nov 5, 2016 22:04 |
|
MALE SHOEGAZE posted:hey when programmers say that something is orthogonal to another thing, what the gently caress do they mean?
|
# ¿ Nov 12, 2016 01:10 |
|
Luigi Thirty posted:there's a web browser for classic Amiga that supports HTML4 and CSS2 with HTML5 support in planning stages
|
# ¿ Dec 13, 2016 16:46 |
|
cinci zoo sniper posted:coffee cup "musings"
|
# ¿ Jul 12, 2017 14:46 |
|
cinci zoo sniper posted:i see your point about concurrency and i know that core python cant into cores, but i had assumed someone has figured out a cython style solution for that or something
|
# ¿ Jul 12, 2017 23:21 |
|
ratbert90 posted:foo[0] = 'b' is the same as *(foo+1) = 'b'
|
# ¿ Jul 20, 2017 14:45 |
|
Isn't the real reason that .net core exists in the first place that even Microsoft doesn't want to have to use Windows for Azure?
|
# ¿ Jul 30, 2017 16:57 |
|
Soricidus posted:java status: tried to run our javafx app in the latest java 9 preview, got an instant crash because apparently you now need to ask specially for certain parts of the standard library using magic command-line incantations, or the jvm will just pretend it can't find them even though they're right fuckign there. added a few magic incantations copied from snack overflow, got another instant crash because apparently they've moved some classes around too. gently caress it i'll just pray it's someone else's problem by the time customers are demanding we support java 9
|
# ¿ Aug 6, 2017 01:29 |
|
JavaFX seemed so nice, too. After this, nobody will use it though. (And probably everyone will just switch to Node.js, lol. Thanks Oracle.) Luckily there's a lot of competition from Microsoft, which is doing a great job of providing a consistent and reliable development experience with the whole dotnet core thing.
|
# ¿ Aug 6, 2017 17:12 |
|
Notorious b.s.d. posted:js implementations using the javax.script APIs have been kicking around for a long time, but they were 3rd party (e.g. mozilla rhino)
|
# ¿ Aug 12, 2017 23:37 |
|
necrotic posted:yaml is the better json but still worse than xml. all of them are better than csv which some jerks insist on using for seed data. With embedded json.
|
# ¿ Aug 24, 2017 03:13 |
|
anthonypants posted:did you know??? .xlsx is actually a .zip
|
# ¿ Sep 16, 2017 00:27 |
|
Gul Banana posted:typescript is better, but what would be much better is if one group would just give up. we don't need two type-definition-annotation languages for javascript (They also have a pointless different fork of Ocaml that appears to exist purely due to bikeshedding and NIH syndrome.) mystes fucked around with this message at 18:16 on Oct 8, 2017 |
# ¿ Oct 8, 2017 18:14 |
|
akadajet posted:both flow and typescript are completely unnecessary. just use babel and write javascript
|
# ¿ Oct 8, 2017 18:38 |
|
pokeyman posted:I saw some posts about this and was completely baffled. why was it such a big deal? if a license is incompatible with your needs then you shrug and move on? if it’s your code you can relicense whenever and however you want? who gives a gently caress??? In the end, the last straw was apparently a bunch of projects like WordPress announcing that they were going to *gasp* stop using React, after months of arguing on all sides. OTOH, facebook also added an explicit patent license (exactly the same as the one that everyone had an issue with for React) to GraphQL which they appear to have actually patented for whatever reason, so I guess that was more of an issue except that nobody was worried about that? I guess nobody actually uses GraphQL, though, they just post on the internet about what a game changer it is.
|
# ¿ Oct 8, 2017 20:04 |
|
|
# ¿ May 10, 2024 16:37 |
|
Notorious b.s.d. posted:it's atom users who are dumb and should be using vs code
|
# ¿ Oct 8, 2017 22:35 |