|
Symbolic Butt posted:
what language is that i want to avoid it
|
# ? Sep 24, 2013 06:47 |
|
|
# ? May 10, 2024 02:10 |
fritz posted:what language is that i want to avoid it scala
|
|
# ? Sep 24, 2013 06:48 |
|
Brain Candy posted:stack allocation, operator overloading and vectorization are a thing, but IDK, the winner for math isn't c++/c. there was a slapfight in the scicomp stack exchange clone about a year ago re: this and i think the results ended up being inconclusive w/r/t/ c vs fortran and there were problems w/ people using free compilers or pay compilers and stuff like that
|
# ? Sep 24, 2013 06:49 |
|
JewKiller 3000 posted:if you can't define the function swap so that the assert passes, your language does not have pass by reference You can write a swap for non-primitives in java EDIT: which jives totes mcgotes with your statement, but still FamDav fucked around with this message at 07:18 on Sep 24, 2013 |
# ? Sep 24, 2013 07:05 |
|
fritz posted:what language is that i want to avoid it it's ruby
|
# ? Sep 24, 2013 07:18 |
|
FamDav posted:You can write a swap for non-primitives in java nope you can't the references you change will only be your local ones, because java is always pass by value at all times. c# permits pass by name ("out" parameters), but java does not
|
# ? Sep 24, 2013 07:20 |
|
Notorious b.s.d. posted:nope you can't are you telling me that this mostly java code:
|
# ? Sep 24, 2013 07:34 |
|
java the hutt
|
# ? Sep 24, 2013 07:40 |
|
Nomnom Cookie posted:I dunno why you're using the term pass by reference then. It has a clear meaning and deals with language semantics, not calling conventions. I should just have precised I was talking about low level representation see the problem is that i prefer to avoid the word "pointer" as well because its a loaded term too and people would have said "there's no pointer in java you dumbass" quote:Taking your meaning, which is "everything is a pointer", it's not an actual issue. Dereferencing pointers from L1 is basically free. of course like everything it only becomes an issue for things that are executed on many objects or in the inner loops of some algorithms etc but its nice not to have to worry about this particular performance hazard and be able to focus your efforts elsewhere quote:Bro you need to learn more about JVM internals if you want to poo poo on them. For starters, Hotspot allocates out of a thread-local buffer (imaginatively acronym'ed as TLAB). In the vast majority of cases Java allocations are pointer bumps. OK, fine. that's a good, efficient way to allocate things. a nice thing when allocating things on the stack though is that freeing it is equally cheap. its just wasteful to reach for the heap for temporary objects Zlodo fucked around with this message at 08:41 on Sep 24, 2013 |
# ? Sep 24, 2013 07:58 |
|
The difference between call-by-value and call-by-reference (also known as "pass-by-value" and "pass-by-reference" respectively) is most easily explained using the following pseudocode.code:
(Some programming languages allow you to call by reference if you use special syntax. This includes PHP and C#.) Look out! Confusingly, many call-by-value programming languages pass an object reference as their value. Use this pseudocode to test this behaviour. code:
|
# ? Sep 24, 2013 09:51 |
|
c pus pus
|
# ? Sep 24, 2013 09:55 |
|
Zlodo posted:of course like everything it only becomes an issue for things that are executed on many objects or in the inner loops of some algorithms etc but its nice not to have to worry about this particular performance hazard and be able to focus your efforts elsewhere quote:Escape analysis is a technique by which the Java Hotspot Server Compiler can analyze the scope of a new object's uses and decide whether to allocate it on the Java heap.
|
# ? Sep 24, 2013 10:16 |
|
Zlodo posted:I disagree. the biggest cost might very well be the GC but dereferencing a pointer is significant enough compared to having the right value in a register in the first place, especially as value types allow compilers to store the fields of small structs directly into registers Your intuition about the heap doesn't apply to the JVM, especially when talking about the young generation. Marking the live objects and blowing away the rest of the young gen is frequently a cheap operation, on the order of a millisecond. Do this 10 times a second and it costs 1% throughput. Yes, that's a cost, but the benefits make it a worthwhile tradeoff. Java programmers don't have to reason about object lifetime or screw around with smart pointers, for one thing.
|
# ? Sep 24, 2013 10:30 |
|
Dessert Rose posted:lol if you can't think of a way you'd actually use this This was pretty neat but couldn't you just get your job to buy you ReSharper? Or just start exploiting that Intellisense knows about camel- and pascal-casing?
|
# ? Sep 24, 2013 10:32 |
|
fritz posted:there was a slapfight in the scicomp stack exchange clone about a year ago re: this and i think the results ended up being inconclusive w/r/t/ c vs fortran and there were problems w/ people using free compilers or pay compilers and stuff like that woaw slow down hoss with your 'measurements'. fortran is the fastest because i saw a benchmark five years ago saying that. now I believe it for all time and any of your stinky evidence is just you trying to trick me into using an inferior solution.
|
# ? Sep 24, 2013 10:43 |
|
auto completion is very helpful to write code but the advantage of making things more concise is that it also helps readability
|
# ? Sep 24, 2013 10:44 |
|
did you do any profiling demonstrating that this closes the gap with c++ performance?
|
# ? Sep 24, 2013 11:08 |
|
zokie posted:This was pretty neat but couldn't you just get your job to buy you ReSharper? Or just start exploiting that Intellisense knows about camel- and pascal-casing? yeah this totally solves the problem also lol if you don't have a personal r# license and you write more than ten lines of c# a year
|
# ? Sep 24, 2013 11:19 |
|
Dessert Rose posted:yeah this totally solves the problem what does resharper add that vs doesnt already have? legit question i never found vs lacking in quality of life features like refactoring etc. so i never bothered with f#
|
# ? Sep 24, 2013 11:32 |
|
Dessert Rose posted:yeah this totally solves the problem Did you know that you can get resharper except its an ENTIRE IDE?
|
# ? Sep 24, 2013 11:35 |
|
Shinku ABOOKEN posted:what does resharper add that vs doesnt already have? legit question it will helpfully import references, suggest refactoring to improve readability and maintainability, keep your styling more consistent, recommend best practices, auto-insert/complete some common blocks, warn you about misuse of closures...
|
# ? Sep 24, 2013 12:45 |
|
qntm posted:... this was an educational post
|
# ? Sep 24, 2013 12:49 |
|
jax-rs trip report: continues to kinda own and is flask levels of easy. all the ancilliary java stuff is weird though, containers and resources and aag. i used cxf and now i don't if i've screwed myself and my code isnt portable because apparently jersey is the way to go??? java is weird
|
# ? Sep 24, 2013 13:46 |
|
jax-rs is a java standard api for REST and cxf and jersey both have implementations of that api, so theoretically if you're using only jax-rs related stuff and not cxf specific its portable between either implementation. I've never used jersey but cxf is great for soap and worked fined for rest the one time I did it.
|
# ? Sep 24, 2013 17:14 |
|
So in the world of java theres this magic thing called the Java Community Process. Basically whenever anyone thinks they have an idea for an api or a language feature that they think would be great to become officially part of java, they can create a detailed spec called a Java Specification Request (JSR) and submit it to the JCP. The JCP council of elders then decides the worthiness of the JSR. If a JSR becomes official then the described API is written and maybe also a reference implementation of that API. For example, Servlet Spec 3.0 is JSR-315. JAX-RS 2.0 is JSR-339. JSRs are like the java version of IEEE RFCs Some APIs, like jaxb (the java xml binding api) are so popular that they become part of the official standard distribution libraries(Java Standard Edition or JSE). Others that are still popular but don't make sense in a client distribution like JSE can be distributed separately or together as a larger standards pack. Java EE is kind of an example of a larger package of JSRs. Depending on the version of Java EE you're talking about it refers to a collection of JSR APIs. For example Java EE 7 includes the servlet-api, jax-rs, and jpa amongst others. If you have a container that is a JEE 7 server, its basically saying "I support all the APIs specified by the Java EE 7 spec!" So anything you write can rely on those apis being available on that platform. Jboss and websphere are examples of such server. If you're writing code against the JSR apis only and no specific implementations, you can then deploy that code to servers like jboss or websphere and they have their own implementations that will connect to those JSR APIs. However, lots of people hate what they think is Java EE when really what they hate is jboss and websphere which are both kind of lovely (websphere is awful). Most people generally do not need all of Java EE though. They're gonna do like you're doing and include the jax-rs api as a dependency on the project and write code against that API. Then you deploy it to tomcat or jetty which are both servlet containers. Since they only provide an implementation of the servlet-api, you would need to provide your own implementation of the jax-ws API. In your case you're using cxf. You should be developing against jax-rs-api and never do anything cxf specific in code. That is, if you remove cxf libraries from your project it should still compile (cause it compiles against jax-rs-api). jax-rs-api is a compile time dependency since its required for compilation and cxf would be a runtime dependency because it is only required when you go to run the code. This way you can either include cxf as a runtime dependency in maven for your project OR add it as a global library to your servlet container (tomcat or jetty). Either way since it is a runtime dependency you can swap it with any other jax-rs implementation (like jersey). tl;dr: java owns and the JCP is pretty good and creates APIs that everyone writes their code against that are separate from implementation code. This allows you to make portable code as long as you only write against the API and not specific implementations. Shaggar fucked around with this message at 17:46 on Sep 24, 2013 |
# ? Sep 24, 2013 17:43 |
|
Brain Candy posted:woaw slow down hoss with your 'measurements'. fortran is the fastest because i saw a benchmark five years ago saying that. now I believe it for all time and any of your stinky evidence is just you trying to trick me into using an inferior solution. modern fortrans look like they might be ok to program in, but i dont think ill ever get a job at a place where 'fortran' isnt just a word to make twentysomething javascript programmers snicker
|
# ? Sep 24, 2013 17:59 |
|
i think shaggar has been right all along
|
# ? Sep 24, 2013 19:13 |
|
shaggar is right he just has bad opinions
|
# ? Sep 24, 2013 19:14 |
|
Shinku ABOOKEN posted:what does resharper add that vs doesnt already have? legit question all the things morkai mentioned plus it also does neat things like suggesting transforms of loops into LINQ expressions it also greatly enhances syntax coloring so interfaces can be colored differently from classes, variables that mutate over the course of a method can be a different style than variables that don't... tbf vs gets more of its features every release but it's still fantastic
|
# ? Sep 24, 2013 19:15 |
|
when is vs2013 coming out? i see the RC is already up and i want to make sure to nab it before my dreamspark account goes away forever
|
# ? Sep 24, 2013 20:03 |
|
Bloody posted:when is vs2013 coming out? i see the RC is already up and i want to make sure to nab it before my dreamspark account goes away forever best feature of 2013 is the return of colored icons (they are still lcd flat though ) i hope the chucklefuck that made the black flat icons got fired into the sun
|
# ? Sep 24, 2013 20:14 |
|
is everything still ALL CAPS DESIGN LANGUAGE. METRO. MODERN. MINIMALIST. BUILD PROJECT
|
# ? Sep 24, 2013 20:24 |
|
my stepdads beer posted:{'default': {'ENGINE': 'django.db.backends.mysql', word
|
# ? Sep 24, 2013 20:25 |
|
what is the best fortran ide?
|
# ? Sep 24, 2013 21:32 |
sublime text
|
|
# ? Sep 24, 2013 21:38 |
|
matlab
|
# ? Sep 24, 2013 21:40 |
|
please don't fortran
|
# ? Sep 24, 2013 21:45 |
|
FamDav posted:are you telling me that this mostly java that's correct. the contents of variables a are b are not swapped by that code. going back to jewkiller's post: code:
code:
this is something that fucks beginners up pretty often.
|
# ? Sep 24, 2013 21:46 |
|
Nomnom Cookie posted:is everything still ALL CAPS this bothers me so god drat much
|
# ? Sep 24, 2013 22:42 |
|
|
# ? May 10, 2024 02:10 |
|
Jonny 290 posted:word johny use postgres
|
# ? Sep 24, 2013 22:54 |