<< 01-08-2014 >>

00:00:43def-Araq: https://github.com/Araq/Nimrod/blob/devel/compiler/jsgen.nim#L1324
00:01:12def-skipTypes always reports tyProc with a tyGenericParam below, but nothing about tyString anywhere
00:02:41Araqyeah, stupid typo
00:02:50Araqn.sons[1].typ
00:02:57def-Aaah, now it makes sense
00:03:30def-perfect, works
00:04:00Araqbtw if you want a new project, get the Lua codegen to work
00:04:14Araq;-)
00:04:20def-I already have too many projects of my own
00:04:35Araqyeah and nobody needs a lua codegen
00:04:53Araqthe plan was to use luajit for the compiletime evaluation engine
00:05:13def-was or still is?
00:05:21Araqwas
00:05:59Araqbut I was bored with these string generating code generators
00:06:17Araqand so I wrote a register based VM instead
00:08:22*Jesin joined #nimrod
00:08:35NimBotAraq/Nimrod devel 7b9e288 def [+0 ±1 -0]: Add "struct" to POSIX flock
00:08:35NimBotAraq/Nimrod devel 93a9f61 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1432 from def-/posix-tflock... 2 more lines
00:08:59NimBotAraq/Nimrod devel 0dd46ee def [+0 ±1 -0]: Set kind of literal nodes as resExpr
00:08:59NimBotAraq/Nimrod devel 29277f8 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1436 from def-/fix-1427... 2 more lines
00:09:11NimBotAraq/Nimrod devel f17de0b def [+0 ±1 -0]: Fix typo in mHigh
00:09:11NimBotAraq/Nimrod devel f43ec61 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1437 from def-/fix-#1291... 2 more lines
00:10:22Araqer def- why did you replace isNil with == nil?
00:10:42Araq== nil is not good for when you compare seqs, for instance
00:10:52def-I saw != nil somewhere and started replacing that everywhere
00:11:15def-Why is it not good for seqs?
00:11:57Araqbecause that generates a complex == for the seq
00:12:38Araqyou can do seqA == seqB and then it lifts the == from the elements to the == for the seq
00:13:01Araqthat's code bloat for simply checking against nil
00:13:15def-So I put them back and make a new pull request?
00:13:36AraqI think github updates your PR automatically
00:13:51Araqjust edit and push in your fork
00:13:57def-alright, i can just commit to the branch
00:14:45def-so all == nil and != nil should be (not) isNil?
00:15:01Araqyeah
00:15:15Araqis there a way to tell git not to show whitespace related diffs?
00:15:22def-I wish
00:15:42def-aah
00:15:43def-git diff -w
00:16:08Araqwhat's up with these guys? did they ever hear about "useful defaults"?
00:16:34Araqwell they reinvented unix, so I guess not
00:16:39def-Well, I guess you wouldn't want someone to insert strange spaces everywhere, so in that case it's sane
00:18:30Araqwell I only care about trailing spaces because of git
00:18:48Araqwhy would I care otherwise? I have a life..
00:24:04def-nil comparisons fixed
00:28:15Araqexcellent ty
00:28:52NimBotAraq/Nimrod devel 2c64067 def [+0 ±1 -0]: Add some nil checks for xmldom (and clean up a bit)
00:28:52NimBotAraq/Nimrod devel dc756a7 def [+0 ±1 -0]: replace nil comparisons with calls to isNil
00:28:52NimBotAraq/Nimrod devel ee61a39 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1430 from def-/xmldom-nil... 2 more lines
00:30:32Araqgood night
00:30:35def-good night
00:30:42adoniscikbyee
00:38:54*xenagi joined #nimrod
01:00:07*mwbrown joined #nimrod
01:01:31*superfunc joined #nimrod
01:02:46Fx00FAraq: you might want --ignore-space-at-eol
01:09:43*Fx00F quit (Quit: leaving)
01:32:14*adoniscik quit (Ping timeout: 255 seconds)
01:35:19*saml_ joined #nimrod
01:35:34*q66 quit (Quit: Leaving)
01:59:19*Jesin quit (Ping timeout: 245 seconds)
01:59:19*Jessin joined #nimrod
02:01:57*saml_ quit (Ping timeout: 240 seconds)
02:04:26*saml_ joined #nimrod
02:08:35*brson quit (Quit: leaving)
02:16:04*saml_ quit (Ping timeout: 240 seconds)
02:27:44*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:29:59*saml_ joined #nimrod
02:36:38*superfunc quit (Quit: leaving)
02:39:39*gsingh93 quit (Quit: Connection closed for inactivity)
03:00:23*bstrie quit (Ping timeout: 240 seconds)
03:01:56*bstrie joined #nimrod
03:29:17*saml_ quit (Quit: Leaving)
03:39:40*mwbrown quit (Ping timeout: 250 seconds)
03:59:26*Demos quit (Quit: Leaving)
04:42:10*flaviu quit (Ping timeout: 250 seconds)
04:56:38*ARCADIVS joined #nimrod
05:01:22*xenagi quit (Quit: Leaving)
05:45:55*Fx00F joined #nimrod
05:46:23*Fr4n quit (Quit: Leaving)
05:50:37*Fx00F quit (Client Quit)
06:06:11*adoniscik joined #nimrod
06:56:28Araqfor flaviu: "What's ironic is that operating systems have no problems with double slashes. That's true for both Windows and Linux. I think it's intentional so you can do a+"/"+b without worrying about extra slashes.
06:56:29AraqTry it, do "cd C:\\\Windows" or "cd ////usr///bin", it'll work. So for local file paths at least it will not be a problem at all.
06:56:31AraqI just tried it with the reddit URL as well - http://www.reddit.com////r/programming/comments/2c9gum/google_testing_blog_dont_put_logic_in_tests/ - and it works, but adding slashes to the other places fails it. I don't know why that is, perhaps the first slashes are handled by Apache itself, but after that passed to custom code?"
06:56:50Araqanother obvious thing that everybody knows about paths ...
07:06:01*bjz joined #nimrod
07:29:29*ome joined #nimrod
07:29:49omeHello :)
07:30:18omeAbsolute rocky here. What are the best resources to read on using Nimrod for web development? Mostly just RESTful-sh APIs and possibly WebSocket.
07:42:58*io2 joined #nimrod
08:15:25*Araq_ joined #nimrod
08:15:37Araq_hi ome welcome
08:16:14Araq_I have no idea about web dev really, but the sources of "nimforum" should be a good start, it uses Jester, nimrod's web framework
08:16:52Araq_keep in mind though that jester's interface will change in the future
08:17:37Araq_I think we have websockets as a babel package now, but I might be wrong, I remember pushing several people to do it ;-)
08:18:50*Ven joined #nimrod
08:18:51*Ven quit (Client Quit)
08:19:33*vendethiel quit (Quit: q+)
08:22:43omeAraq_: Thanks, I will have a look.
08:23:17omeJust a question to be sure, with Nimrod, everything is importated in the global namespace right? the packages don't have an individual namespace like in Go or Python?
08:23:30omeOr Node.js
08:25:50*Trustable joined #nimrod
08:26:06Araq_no, that's wrong
08:26:50Araq_it's just that import foo; echo bar where bar is in foo is allowed
08:27:14Araq_you can use from foo import nil and then you have to use foo.bar
08:28:25Araq_that doesn't work too well with operators though and I consider it "optimizing reading for the people who have no IDE" so it's not the default
08:32:35*Trustable quit (Quit: Leaving)
08:33:12omeAraq_: Ah, I see, but is there a reason that it's implicit instead of explicit? wouldn't `import pkg` and then using `pkg.foo` along side with `import all from pkg` or `import pkg _` or `import here pkg` or something like that would have been a better option?
08:33:34omeWhit the later option allow you to just call `foo`.
08:34:25Araq_well I already tried to explain why it that way and why it is good the way it is ;-)
08:58:10*dom96_w joined #nimrod
08:59:48dom96_wome: As Araq said: that would not be good for operators. While languages such as Go or Python don't allow you to overload operators, Nimrod does.
09:00:25*Araq__ joined #nimrod
09:00:44dom96_wSo if you define your custom `+` in module foo and import you would need to write foo.`+`(5, 6)
09:02:36*Araq_ quit (Ping timeout: 250 seconds)
09:20:58*dom96_w quit (Quit: Page closed)
09:28:39*abeant joined #nimrod
09:30:34Araq__hi abeant welcome
09:38:23*abeant left #nimrod ("Textual IRC Client: www.textualapp.com")
09:40:04*bjz_ joined #nimrod
09:41:23*bjz quit (Read error: Connection reset by peer)
09:46:27*adoniscik quit (Ping timeout: 245 seconds)
09:51:33*kunev joined #nimrod
09:54:59*Araq__ quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237])
11:40:43*saml_ joined #nimrod
11:46:49*mwbrown joined #nimrod
11:49:40*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
12:09:34omedom96, Araq Yeah sorry, I didn't saw his explanation before I posted my question. Well, if a package does operator overloading, it could specify to be imported into the global space using a specific syntax, like the examples I give.
12:09:52omeBecause "Explicit is always better than implicit.", isn't it?
12:10:36omeBecause I just looked at the Jester source and it uses 'get', I can think of so many other packages that could use get.
12:11:14ome`import . pkg` to import it all looks a nice syntax.
12:11:24omeBut perhaps, not that good, because dot can be overlooked.
12:15:06def-ome: you can still use the module name, so jester.get would work
12:16:51omedef-: Yes, but looking at the "official" example, no one is using it as is.
12:17:45omeI am just worried we will end up with lots of "from pkg import nil".
12:18:05omeOr once a pkg changes it's api it can possibly create clashes.
12:19:09*Araq_ joined #nimrod
12:19:26Araq_ "Explicit is always better than implicit."
12:19:42Araq_firstly this is wrong
12:20:04Araq_secondly that comes from a programming language where you can't even write down the types
12:20:39Araq_but I've given up on explaining programmers how language really works ...
12:20:48saml_that's python
12:21:06saml_obvious is better than not obvious
12:23:21Araq_stdlib.system.logger.log("foo") # explicit
12:23:28Araq_log("foo") # implicit
12:23:37*kunev quit (Quit: leaving)
12:23:41Araq_'obviously' explicit is better
12:23:53Araq_unless you start to consider statistics ...
12:24:27Araq_if I have 100 calls to 'log' in my module, is explicit still better? or is it *noise*?
12:26:14Araq_and what happens when I'm interested in the used algorithm and architecture and not in "omg, where does this come from"?
12:32:14*mwbrown quit (Ping timeout: 250 seconds)
12:32:21saml_you can't import stdlib.system.logger.log ; and start using log("things") ?
12:34:11*untitaker quit (Ping timeout: 255 seconds)
12:40:38Araq_saml_: surely you can do that
12:41:12*untitaker joined #nimrod
12:41:40*Araq__ joined #nimrod
12:41:45Araq__the only real question is what should be the default
12:41:47Araq__nimrod's default is different from python's
12:42:10saml_implicit log("something") would mean that there's something like global.log = getLogFrom("some.property.that.actually.points.to.some.logger.xml.config")
12:44:53*Araq_ quit (Ping timeout: 240 seconds)
12:47:30Araq__saml_: not necessarily, there are lots of other solutions possible
12:47:57Araq__it could simply be a template for instance that accesses a *local* logger
12:51:18*darkf quit (Quit: Leaving)
12:51:40*flaviu joined #nimrod
13:00:52*saml_ quit (Quit: Leaving)
13:04:17omeAraq__: Yes, but your example wrong. log("foo") is hardly implicit. It makes sense. But `get "/":
13:04:17ome resp h1("Hello world")
13:04:17omedoesn't.
13:04:46omeWhile web.get("/", .... or server.get(".", .... is pretty explicit.
13:05:28omeAraq__: And I am not a fan of python, I hardly even consider myself "good enough" with that language let alone advocate it.
13:06:35omeI am surprised you're not expecting lots of name collisions which will results in lots of `from pkg import nil` which is ugly and tedious.
13:06:54Araq__well there is also: import foo except bar
13:07:09omeI say ugly, because if I didn't knew the explanation, I would expect the compiler to optimize out any 'nil" import.
13:07:19Araq__and btw this 'get' thing in jester is really horrible, I agree
13:07:32Araq__in devel it uses a different DSL
13:08:26Araq__dunno what that means "optimize out 'nil' import"
13:08:52Araq__imports are declarative, not subject of any kind of optimization
13:08:57omeYou tell the compiler that `from pkg import nil`, it naturally should mean that don't import anything.
13:09:18omeAnd thus, the compiler should totally ignore that line and complain about using `pkg.ANYTHING` as not imported..
13:09:44omeOr at the very most, import something called "nil", and only that.
13:10:01Araq__yeah I suppose you're right
13:10:12Araq__many people complain about this syntax
13:10:41Araq__but it makes some sense too
13:10:49Araq__from foo import bar
13:10:56omeThat is prefect.
13:10:59Araq__foo.abc # works
13:11:26Araq__it means you import 'foo' and can access 'bar' without qualifier
13:11:32omeWell, `from foo import bar` should mean that `bar` should work, `foo.abc`, I am not sure.
13:11:46Araq__but everything can be accessed with a qualifier
13:11:59omePerhaps, it should, but then when I read the code at the top that says `from foo import bar`, I would expect the program to only use bar.
13:12:15*flaviu quit (Read error: Connection reset by peer)
13:12:41omeAraq__: A good programming language shouldn't fight instincts. It should build around it. :)
13:13:26omeThe less people have to learn, the better the language.
13:13:39Araq__not really
13:13:48*flaviu joined #nimrod
13:13:52omePlease elaborate.
13:14:32Araq__easy to learn is only important when you learn the language
13:14:44Araq__there comes a time when you want to use it though
13:14:58Araq__and then features start to win over ease of learning
13:15:22omeCorrect, but if it is easy to learn, it means it is also easy to understand. The problem with complexity is most often not when you write it, but when you revisit it.
13:15:22flaviuAraq__: I disagree. Easy to learn also means less mental overhead later on when doing stuff.
13:15:37omePrecisely, flaviu.
13:16:13Araq__flaviu: program in euphoria then
13:16:19Araq__it's very simple
13:16:35Araq__it's also a pita for anything over 10 lines of code
13:16:50omeAraq__: Of course, there is times when complexity has a great pay off, but I don't think that is the case here, it's rather a complexity with no real turn around.
13:16:52Araq__it's all about finding a balance
13:17:03Araq__ome: so let's see
13:17:05Araq__I do
13:17:13Araq__from foo import abc
13:17:36Araq__and then I later also need foo.xyz
13:17:41Araq__so I write that
13:17:53Araq__and now the compiler makes me add xyz to this list
13:18:19omeWell, if you need it, you go and say `import foo; from foo import abc;`.
13:18:24Araq__this is exactly what we require in other places for technical reasons and people hate it
13:18:28omeNow, you have the foo and abc in your global namespace.
13:18:40flaviuEuphoria actually looks nice, if only the keywords were shorter
13:18:43omeWhich means you can use `foo.ANYTHING` and `abc` which will be same as `foo.abc`.
13:18:50omeI have a lot of respect for this:
13:18:51omeAny fool can write code that a computer can understand. Good programmers write code that humans can understand. Martin Fowler, 2008.
13:21:18Araq__Good programmers understand quite a lot.
13:22:32Araq__they also have lots of experience and care about semantics rather than syntax games
13:22:41flaviuAraq__: I really like Python's syntax for imports, and it works the same as most other programming languages
13:22:55omeNode.js works almost the same way.
13:23:00Araq__flaviu: Java works differently
13:23:02omeSo does Go, kind of.
13:23:05Araq__and so does C#
13:23:12Araq__and C, C++ , ...
13:23:25Araq__"most other" PLs my ass
13:23:31flaviuAraq__: How so? Different syntax, but same ideas
13:23:36omeAraq__: The question here is not being like any language, the question is that of "common sense" and being "natural".
13:24:02omeAraq__: At the end of the day, it is your language, your baby, you can do what you please.
13:24:07Araq__exactly
13:24:22omeBut that was my two cent. You can either fight it, or consider why a lot of people complain about it.
13:24:31Araq__and I created Nimrod because there is no other language left that doesn't treat me like an idiot
13:25:19omeIf you want to create a language that is a challenge to understand, then your imports syntax has done a good job of it. :)
13:25:32Araq__and the feature has been designed because it's most useful this way
13:25:38omeI wish every programming language treated me like an idiot, that way, I didn't had to think too much but instead get work done. :)
13:26:53Araq__and yet people get work done in nimrod faster than anywhere else ... well once we have a stable compiler and more modules ...
13:28:31omeIf it is unnecessary hard to understand, people won't get on board. Keep that in mind.
13:28:36omeI have to go now, I might come around.
13:28:37omeAdios.
13:28:42Araq__bye
13:29:52flaviuBtw, I don't have much of an issue with the import syntax, I just think he has a point on making things easy to learn
13:31:36Araq__"easy to learn" doesn't mean much
13:31:54Araq__"that's error prone" is a much more important criterion
13:32:41flaviuIf a concept isn't fully understood, ie not easy to learn, usage of it will be much more error prone
13:32:41Araq__ and so is "tedious to use"
13:32:49omeWhile I wait for my housemate to leave the bathroom, I might just keep talking here.
13:33:06Araq__flaviu: the particular feature in question is not error prone
13:33:07omeEasy to learn and error prone is hardly mutually exclusive concerns.
13:33:27Araq__it's just that I preferred DRY over "intuitive" here
13:33:32flaviuAraq__: Sure, but I've already said that I don't really care about that
13:34:00Araq__it's not some conspiracy to make the language unnecessary hard for beginners
13:34:23Araq__there is a tradeoff involved here and you all happen to ignore it
13:34:51omeNot that, I think you're just over estimating the benefit of current system because of possible operator overloaders.
13:35:18omeAlso, at least the `from pkg import nil` can be improved.
13:35:24Araq__btw this way is also much simpler to implement and people already complain about the compiler being too hard to human beings to understand
13:35:48Araq__but yeah, it's different from python and thus wrong, I got it
13:36:36omeIt's not about being different from python.
13:36:46Araq__ome: it's not only operators, the whole language works this way; x.foo is the same as foo(x)
13:37:21omeIt is about being counter incentive.
13:38:09flaviuAraq__: How about import foo.*?
13:38:20flaviuEveryone know globbing
13:38:33*dom96_w joined #nimrod
13:39:32omeI think that is a lot better.
13:40:46dom96_wBreaking all code is surely a bad idea.
13:41:20dom96_wAs far as I can tell this is how Haskell does it too.
13:41:23omeIt is a new language. Still beta. That is expected.
13:41:38flaviudom96_w: Probably. I think that the current syntax fine though, although I wouldn't mind that change.
13:41:46*kunev joined #nimrod
13:41:49omePerhaps support both syntax and give a deprecation warning and remove the old one later on.
13:42:12dom96_wome: Have you ever tried a language which did it this way?
13:42:18Araq__import strutils.*, os.*, ast.*, .. # this gets annoying quickly for long lists, imho
13:42:44dom96_w(the way that nimrod currently does it)
13:42:53omedom96_w: No. I don't think so.
13:43:32Araq__in theory we can make breaking changes on a scale like this
13:43:33flaviuimport qualified foo; from foo import qualified bar ?
13:43:36dom96_wome: In that case, instead of worrying about what the problems /may/ be. Try Nimrod.
13:43:52Araq__in practice we had people that told us "no big deal, I'll update all the code myself"
13:43:57omedom96_w: Can you tell a language that does import everything in the global namespace by defualt?
13:44:07dom96_wome: I just did: haskell.
13:44:17Araq__and then they figured what it means to update > 100_000 lines of code
13:44:29Araq__and disappeared
13:44:34flaviuome: And C, although that doesn't really count
13:45:07Araq__and that's not even a fraction of what's out there
13:45:10dom96_wWe *do* listen to our users, the problem is that words mean very little.
13:45:24dom96_wSo then we will spend months fixing code and you will just disappear.
13:46:06flaviudom96_w: But everyone else will still be able to use the changes
13:47:23flaviuThink of it as "Someone thinks that X would improve it for everyone", not as "Someone wants X"
13:47:27Araq__ome: another example would be Delphi
13:47:49Araq__or C, C++
13:47:54Araq__Objective C
13:48:33Araq__and Java's import works in a similiar way in taht you can use module.bar without telling so in the import list
13:48:36dom96_wI think something like Haskell's qualified import would be /nice/
13:49:35Araq__so here you go, it works this way for >90% of all source code in the entire world
13:53:32omeI just had a quick look through Haskell and it is fairly different.
13:53:46omeAlso, if "it works" is the argument, then why a new language at all.
13:53:49omeC works.
13:54:34dom96_wBecause Nimrod wasn't built solely with that specific feature in mind.
13:54:54omeIt is not really a feature. :)
13:55:00omeIt is more of how a task is done.
13:55:14*Matthias247 joined #nimrod
13:55:41Araq__look, somebody said that Python's way is how it's done "everywhere" and that's utterly wrong
13:56:04Araq__most code is written in some language where it works differently from Python
13:56:16Araq__that was the argument
13:56:18omeWhy is python so important here.
13:56:35omeIt's not about python, if I liked python so much, I would have stick to it.
13:57:23Araq__the argument was not that it "works" but that there is no such consensus of how it is "natural" to work
13:58:14Araq__(do I have to mention that I consider Nimrod's way to do it "natural"?)
13:58:34flaviuAraq__: Sure there is. Get a bunch of non-programmers and give them a sheet of paper with syntaxes to fill out.
13:58:56omeSo, `from pkg import nil` is how naturally you say `import pkg but keep it in it's own name space`?
13:59:26Araq__ome: yes and I explained why that is
13:59:41omeflaviu: That is the most unbiased approach I think.
14:00:18Araq__flaviu: that has been tried and produced SQL's synax
14:00:29Araq__not that it is a bad approach
14:00:37flaviuome: It is consistent with the `from pkg import foo`, which is sort of like the pseudo syntax `import qualified pkg; from pkg import foo`
14:02:07Araq__bbl
14:02:10*Araq__ quit (Quit: ChatZilla 0.9.90.1 [Firefox 29.0/20140421221237])
14:03:46flaviuAraq: Update your firefox!
14:10:39dom96_wflaviu: Have you ever had any problems with the way Nimrod handles module imports?
14:11:12flaviuNope
14:13:17dom96_wome: that is why I urge you to try it before arguing against it
14:14:12flaviudom96_w: I do agree that it could be improved
14:17:49dom96_wI do too. But backwards breaking changes are not necessary.
14:31:46*Jessin quit (Ping timeout: 260 seconds)
14:33:10*Jessin joined #nimrod
14:36:37*dom96_w quit (Quit: Page closed)
14:52:20*kunev quit (Quit: leaving)
14:52:28*kunev joined #nimrod
14:54:42*ARCADIVS quit (Quit: WeeChat 0.4.3)
14:55:51*Demos joined #nimrod
15:15:16*mwbrown joined #nimrod
15:17:33*Matthias247 quit (Read error: Connection reset by peer)
15:41:13*Jessin quit (Quit: Leaving)
15:46:40*Jesin joined #nimrod
15:54:35*kunev quit (Quit: leaving)
15:59:04*flaviu quit (Read error: No route to host)
16:35:57*Fr4n joined #nimrod
16:46:54*adoniscik joined #nimrod
17:05:10*brson joined #nimrod
17:07:30*ome quit (Quit: Connection closed for inactivity)
17:17:00*vbtt joined #nimrod
17:17:29vbtthello guys, what's this talk about a lua codegen?
17:18:28vbttbtw, you don't need to generate strings, if you use something like the luajit lanugage toolkit https://github.com/franko/luajit-lang-toolkit
17:19:56vbttbut i'm not suggested anything be re-written
17:20:09vbttsince the compile time stuff works, just leave it.
17:22:16DemosI dont think we are doing that anymore, luajit was going to back CTFE and nimrod i
17:23:06vbttwhat's nimrod i?
17:23:12Demosnimrod's REPL
17:23:15Demostry it!
17:23:41vbtthow do i invoke it?
17:23:46Demostype nimrod i
17:23:51vbttdoh
17:24:00vbttok, will try it later.
17:24:18vbttthe same evaluator is used for the repl and ctfe?
17:24:37Demoswell lua would have been, and I think the current VM is used for both
17:25:21vbttok
17:27:47*dsb joined #nimrod
17:28:20dsbhello.
17:28:45DemosHello dsb!
17:31:58*Trustable joined #nimrod
17:41:11*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:48:15*q66 joined #nimrod
17:51:42*shodan45 joined #nimrod
18:18:16*Fx00F joined #nimrod
18:18:24dsbcheers :)
18:18:27*dsb quit (Quit: Leaving)
18:28:32*Fr4n quit (Ping timeout: 245 seconds)
18:32:32Araqso I just checked how python does it
18:32:38Araqand it's interesting
18:32:46Araqfrom os import getenv
18:32:57Araqos.getenv("foo")
18:33:04Araq--> name 'os' is not defined
18:33:15Araqfrom os import getenv, os
18:33:21Araq--> Cannot import name os
18:33:25*Fr4n joined #nimrod
18:33:59AraqIMHO nimrod is much saner in this respect
18:34:02RaynesAraq: I don't have playback -- what was the context?
18:37:01RaynesEXPLAIN
18:37:02Raynes:p
18:37:14RaynesOh, were we talking about qualified imports?
18:37:54Araqhi Raynes. glad you're still around
18:37:59RaynesI never leave.
18:38:05Araqcheck out our topic header
18:38:21RaynesOh you guys have logs now
18:38:34Araqsince forever
18:42:53RaynesAraq: So, to be clear, you're advocating for importing names unqualified because otherwise calling operators wouldn't be pretty?
18:43:12RaynesAnd the alternative is only necessary for non-IDE users?
18:43:20*Fx00F quit (Quit: leaving)
18:43:54Araqyes and no. you missed the most important reason
18:44:09RaynesWell, I have about 5kb of backlog to read through here.
18:44:12RaynesI'm sure I missed something.
18:44:27Araqwhich is that foo.bar is rewritten to bar(foo)
18:44:45Araqand this also pretty much relies on the import mechanism
18:45:31RaynesI'm just trying to imagine a scenario where this could possibly be a good thing is all.
18:46:05Araqthis is called "Pulling problems out of your ass"
18:46:17RaynesI can't imagine what kind of horrifying mess a large project would get into trying to do this. Also, implicitly importing * from things makes it incredibly difficult to hunt down where code is coming from when reading code.
18:46:18Rayneslol
18:46:21RaynesSee
18:46:50RaynesBeing an asshole to everyone who questions your decisions in Nimrod isn't a fantastic way to handle things, but I suppose it's one way to go about it.
18:47:03RaynesThat's my cue to leave.
18:47:04RaynesCheers.
18:47:09Araqbye
18:47:10*Raynes left #nimrod ("Textual IRC Client: www.textualapp.com")
19:04:23Trixar_zaDammit, why do all the assholes run away
19:04:46Trixar_zaAre they scared somebody would come along and prove them wrong?
19:11:20Araqwell in Raynes' world it's easier to "imagine" things than dealing with facts
19:13:20Trixar_zaTrue. But it's fun shattering their world view
19:13:49Trixar_zaAnd have you noticed how they always imagine the worst possible outcome without any regards for reality or human nature?
19:15:35Araqwell I noticed that they never ever used Delphi/FPC which is half a million lines of code and produced one of the most impressive systems ever
19:16:10Araqwhich is a cross platform IDE / UI builder running on mac, linux and windows with the native toolkits
19:16:10Demosor the fact that the largest codebases around are (probably) in c and c++
19:17:19Trixar_zaSo in other words, they're perfect for management? Oo
19:18:17DemosI think nimrod tends to come across as being very loose and not having the tools to organise your code. I dont think it actually is like that though
19:18:54AraqTrixar_za: no, they are not perfect, but when it comes to module management nothing is
19:19:28Araqand nimrod actually provides many features to deal with namespacing
19:19:53Trixar_zaI was more joking about middle management of a company. You always have one manager that thinks he knows technology and requires hard or impossible features at the end of the day
19:20:02Araqah yeah
19:21:17Araqwell I seriously wonder if there are programmers left who can imagine non-broken tooling
19:21:38Araqwhere you can ... I don't know ... click on identifier to go to its definition maybe?
19:21:52Araqnah, that's clearly science fiction
19:21:53Demosor use grep
19:22:12Demosliek with nimrod greping for the identifier followed by * will probably get you what you want
19:22:43Demosalso requireing qualification would make generic code hard to write
19:24:28Araqit makes any code hard to write
19:24:36Demostrue
19:24:46Araqand it doesn't really make it easy to read either once you're interested in how it works
19:25:00Araqas opposed to "argh, I'm lost"
19:25:11Araqit only adds noise
19:26:31DemosI also think complex module systems can encourage people to break up their code a whole lot without actually realizing where the natural bounderies are. So you just get a bunch of modules that all depend on each other anyways. (I am guilty of this sometimes)
19:26:57Araqyeah this is usually the next thing these guys want
19:27:04Araqcircular module dependencies
19:28:16Araqand once you have that, you don't have "module system" anymore, but a "feeling good namespacing system"
19:29:05DemosI wonder how the c++ modules will turn out... I hope they do OK but they do not look all that simple at the moment
19:30:17DemosI have talked with several c++ devs who /insist/ that their particular form of include guards is a good alternitive to real modules, or say that you should just use forward declerations and PIMPL "properly"
19:30:41Araqin fact ... C's include system is not nearly as bad as people think it is when it comes to cyclic dependencies
19:31:06AraqC++ is worse in this respect because you have to add private stuff in the headers
19:31:56Demosright, it does not really allow them, you gotta forward declare. The trouble with C and C++'s include system is that it is not order-independent and it makes it really hard for tools to figure out what the fuck is going on. And it makes compile times slow
19:32:33DemosYou have used Ada right? how are its compile times these days? I hear back in the old days people did not like it because it took so long to compile, and that is why they used C
19:33:20AraqI switched from Ada back to Delphi because of the compile times and the inferior tooling
19:34:29DemosI would have suspected that Ada compiles much faster than C and C++ these days due to having real modules
19:35:09AraqI don't know. Faster than C++ for sure
19:35:22Demosit probably scales better
19:35:57Araqyeah well. it's GCC based
19:36:18AraqGCC produces text based assembler code and then runs GAS over it, etc
19:36:56Araqmodules are not everything. compare that to Delphi which produced optimized binary code in 2 passes
19:37:28AraqDelphi really spoils you. they had bug reports their "compile" button does not do anything
19:37:56DemosDelphi is way to expensive though
19:37:59Araqbecause it was finished before they released the mouse
19:38:11Araqthat was Delphi 5 btw
19:38:22Araqit ran on a 486
19:38:53Araqit is unbelievable
19:40:14Araqspeaking of Ada, in Ada you have to use 'with foo' to import foo and then 'use foo' to import all the symbols
19:40:34AraqI used "with foo; use foo;" for every single module ...
19:40:47Araqlater they added "with and use foo" to the standard iirc
19:42:55Demoshm I should learn Fortran at some point
19:45:09AraqAda is really nice if you like to guarantee bounded memory usage. but they crippled the language in the name of this feature.
19:46:28Demosit just looked totally verbose to me
19:48:54*rektide_ is now known as rektide
19:52:56*linkmonitor joined #nimrod
19:53:41Araqyeah it is verbose but then it does everything what people want these days
19:54:14Araqit's memory safe, concurrent, uses "end if" instead of indentation, makes you import things explicitly
19:54:43Araqit has subrange types and contract programming
19:55:12Araqit doesn't have a GC, it's low level
19:56:57samlis nimrod suitable for web application writing? mostly IO wait/blocking applications
19:58:45Araqsaml: we have async+await, so yes. there is one showstopper bug left that keeps the Forum from working asynchronously
19:59:44Araqbut the HTTP server already works fine
19:59:54Araqin async mode
20:01:34dom96Yes, and we found the cause of the bug. It's just a matter of fixing it now.
20:01:50*dom96 looks at Araq
20:02:14samlwhat is the Forum?
20:02:31samlhttps://github.com/nimrod-code/nimforum ah this?
20:03:45*linkmonitor quit (Quit: Page closed)
20:04:03AraqDemos: Ada and ATS are the primary example of how "professional" programmers *pretend* to know what they want/need but when you deliver exactly that, they won't use it for some reason like "ugh, too hard" or "ugh, too ugly"
20:04:28Araqthey will never admit this on reddit though
20:04:52samli tried to learn ATS but it was hard
20:04:59Araqsee? lol
20:05:20samlpython was easy but i made a mess in python projects
20:06:51AraqAda has been shown to produce fewer bugs and to be more cost effective than C and C++
20:07:03Araqdo you think anybody cares?
20:07:55*vbtt joined #nimrod
20:08:25samli heard Ada is military funded or something. I'm just a web developer. I only care for web things personally.
20:09:15vbtthi guys, looks like i just missed an interesting discussion :D
20:09:43Araqsaml: well I'm not talking about you. I'm talking about the "systems" programmers who know everything and yet can't make a single rational decision.
20:11:23dom96Araq: If I say that I don't care will you stop ranting and fix this bug for us? Pretty pleaseee./
20:11:34samlwhat's the bug?
20:11:50samlnot that i can contribute. but just curious
20:12:04samli'm gonna learn how to do file IO in nimrod for now
20:13:02samli have a csv file. and I want to return array of int arrays
20:14:10dom96saml: Take a look at the parsecsv module.
20:14:16vbttso stupid q cos I didn't see it in the manual: module x contains foo(:string), module y contains foo(:int). what happens when i import a, b?
20:14:33vbtti suppose I can use foo() and the right one is called?
20:14:40dom96you mean import x, y right? lol
20:14:41dom96Yes.
20:14:50vbttright x, y.
20:15:05vbttand what if the signature is the same, requires me to fully qualify the function? x.foo() ?
20:15:10dom96yep
20:16:05vbttthat seems pretty reasonable, not sure what people are complaining about. you can't know where 'foo' came from? maybe not with notepad, but if you had a proper tool it should just be able to where it came from.
20:16:13Araqdom96: working on it
20:16:22dom96Araq: thanks
20:16:23vbttthanks dom96
20:17:02dom96vbtt: Yes, and if you think about it: it's really a non-issue thanks to Google.
20:17:03vbtti used to like explicit imports like Python and I think that works fine too. However you do end up with a boat load of explicitly imported symbols at the top.
20:17:14dom96And http://build.nimrod-lang.org/docs/theindex.html
20:17:30dom96You simply search for the function name
20:17:34vbttI mean some kind of code browser provided by nimrod.
20:17:48vbttyou can't possibly search google for your own code.
20:18:15dom96True.
20:18:17vbtteven if it doesn't exist, should be possible to write given such function will be statically resolved.
20:18:37vbttalso, note that even in Python if I do x.foo() you have no idea where it's defined cos you would have to know the type of x.
20:19:05dom96Yep. That's another good argument.
20:19:31vbttmore interesting code uses polymorphism anyway and you usually call methods, not top level functions.
20:21:40vbttdoes this work with dynamic dispatch too? e.g. module a defines foo(:subclass1) and module b defines foo(:subclass2). can i import a,b and then foo(x:baseclass)
20:21:51*Trustable quit (Quit: Leaving)
20:22:19dom96Good question.
20:22:22*dom96 has no idea
20:22:58vbttwell if that's how methods work, i.e. x.foo() -> foo(x) then I believe it should just work.
20:23:32samlhttp://nimrod-lang.org/parsecsv.html#example-how-to-use-the-parser_toc from this example, how can I find out which module defines newFileSystem, fmRead .. etc?
20:23:54samlis there IDE that i can use to go jump to definition of those variables?
20:24:33Demosnimrod.vim should support it
20:24:41DemosVisual Nimrod does too but that is not really stable
20:24:56vbttsaml:http://build.nimrod-lang.org/docs/theindex.html as dom96 posted above
20:25:21samloh nice
20:25:22vbttwould be nice if the examples cross linked
20:25:42dom96With some luck filwit is working on new docs as we speak.
20:26:01vbttnice. i heard some new docs were underway a few months ago too :p
20:26:11dom96Yeah... I think he's been busy lately.
20:26:18dom96With life and such heh
20:26:32vbtti understand
20:26:37Demosif I take something "by value" is there a way to get an address of it and just swear that I will not alias or modify it?
20:27:18vbttis there a nimrod roadmap btw? seems like i asked the question months ago too.
20:27:47vbttthe link from the home page to 'roadmap' goes to a non-existant wiki page.
20:27:49Demosyeah there is
20:28:12dom96https://github.com/Araq/Nimrod/wiki/Roadmap
20:28:26vbttdom96:thanks
20:29:50vbttwhat's the 'new concurrency model'?
20:30:33*io2 joined #nimrod
20:31:01*Fx00F joined #nimrod
20:32:33Demosalso does the array typeclass include seqs? I guess not
20:41:18vbttif someone new was looking for a small project to work on nimrod, what would that be?
20:41:29vbtta list of such projects on the wiki would be nice
20:41:45vbttbbl
20:45:45AraqDemos: no, but I thought about an unsafeAddr opertion
20:45:54Araqwell the name makes no sense
20:46:07Araqit's trivial to implement thanks to .emit
20:46:21Demosyeah, I will just stick with var
20:47:50Araqvbtt: I'm very proud of the new concurrency model
20:48:16*jackal13 joined #nimrod
20:48:21Araqit's
20:48:27Araqa) memory safe
20:48:34Araqb) uses thread local GCs
20:48:54Araqc) prevents deadlocks and data races
20:49:05Araqd) maps to GPUs
20:49:14Araqe) cures cancer
20:51:48Araqit also fits nimrod's design really well and is elegant and for some use cases more expressive than anything else
20:52:07Araqok, enough of this
21:05:01Demosoh, Casey Muratori posted a big ol lecture on API design
21:05:37Araqdoes it start with ADT vs OOP?
21:05:44Araqif not, it's likely wrong :P
21:05:49*superfunc joined #nimrod
21:05:59*jackal13 left #nimrod (#nimrod)
21:06:07DemosI am three mins in
21:09:05Demosit is from 2004 and game industry focused
21:15:17Demoshe used to work for RAD game tools, which puts out some pretty good APIs (or so I hear)
21:17:21Demoshis point seems to be that you should be able to integrate the API just as much as you need to get something working
21:22:43dom96Demos: link?
21:23:08Demoshttps://www.youtube.com/watch?v=ZQ5_u8Lgvyk
21:23:46dom96thanks
21:24:31dom96I misread the "Published on" date as 2004 and was really impressed lol.
21:25:12Demoshehe
21:27:30*superfunc quit (Ping timeout: 250 seconds)
21:28:32*superfunc joined #nimrod
21:38:24*askatasuna joined #nimrod
21:50:23*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
21:57:50*mwbrown quit (Ping timeout: 250 seconds)
22:07:55vbttback
22:08:28vbttI like thread local heaps, global heaps are too error prone and not that useful.
22:08:52vbtti want to design for multi machines as well, can't have global heaps there.
22:09:02vbttthread local heaps are great.
22:09:12vbttthe question is how you send data from one heap to the other?
22:09:17vbttmessaging or stm or something else?
22:10:41vbttalso, what concurrency exists within the thread?
22:13:17Araqsending data works via handshakes
22:13:40Araqthat's like messaging but with 1 copy instead of 2
22:13:42vbtti mean what's the api? channels? one inbox per thread?
22:13:46vbttah ok
22:13:50vbttthat's very nice
22:13:57Araqchannels are supported too
22:14:18Araqthe API is basically spawn foo(a, b, c)
22:14:39Araqit returns a future if foo returns a non-void type
22:15:19Araqread doc/spawn.txt for more information
22:15:23vbttspawn starts a new thread?
22:15:27*saml quit (Quit: Leaving)
22:15:37Araqit sends it to a thread pool
22:15:40Araqso no.
22:16:09vbttah ok
22:16:12Araqthe thread pool adapts to your current CPU load
22:16:26vbttok. so spawn creates a new isolated heap?
22:16:38Araqno, the thread and its heap already exists
22:17:42vbtti see, so multiple tasks share the heap?
22:18:27Araqyeah
22:19:07vbttok, so multiple tasks are distributed across possibly fewer (thread + heap) containers.
22:19:18vbtti assume each task is bound to the same thread/heap?
22:19:26Araqyes
22:19:26vbttcos it'll be allocating stuff.
22:19:45vbttwhen does the thread switch from one task to another?
22:20:24Araqhmm this question doesn't make sense really
22:20:53vbttwell what might causes a task to suspend and the thread to execute another task?
22:21:09Araqthe implementation is in fact, crazy but I benchmarked it and it is on par with traditional threads + message passing
22:21:41Araqand for good reasons
22:21:44vbttok
22:21:52Araqbut it takes a while to explain all this ...
22:22:14vbttwell a thread can run only one task at a time.
22:22:28vbttand since it has to run multiple tasks, it has to schedule them somehow.
22:22:48Demosyour OS can do this
22:22:55*mwbrown joined #nimrod
22:22:56Araqyes, that's the traditional thinking
22:22:56Demosunless you still run MS-DOS
22:23:47vbttthe OS doesn't know about your tasks, only about the threads. it will schedule the threads but the threads still have to schedule the tasks.
22:23:55vbttunless i completely misunderstood this.
22:24:19vbttthe OS doesn't know what new task came into existance at 'spawn' there is no OS level call there.
22:27:16vbttanyway, it seems if the message is from one task to another in the same thread, it's a copy on the same heap and the same thread so no issues there with single copy.
22:27:40vbttacross threads, you need some kind of coordination, i guess that's what you're saying is a handshake?
22:36:40*Matthias247 joined #nimrod
22:37:18Araqthere is also spawnX which runs the task on the same thread if desirable
22:37:33Araqusually that is a bad idea though
22:37:49Araqbecause this then blocks the consumer for too long
22:45:56*superfunc quit (Ping timeout: 250 seconds)
22:47:59*superfunc joined #nimrod
23:09:41*darkf joined #nimrod
23:12:02*flaviu joined #nimrod
23:12:48flaviu"<Araq> where you can ... I don't know ... click on identifier to go to its definition maybe? <Araq> nah, that's clearly science fiction"
23:12:49flaviuForget about java again?
23:13:21Araqflaviu: are you serious?
23:13:33flaviuYes, just use intelliJ
23:13:36Araqtold you I used Delphi that did this before you were born
23:14:29Araqso yes, I know what tools are capable of
23:14:48superfuncSorry if this is a dumb question, but what will the difficulties be in distributing my game which is just plain Nimrod + SDL2
23:15:13Araqsuperfunc: for windows distribute your .exe and sdl2.dll
23:15:33OrionPKso basically not a difficulty ;)
23:15:36Araqfor linux provide a .deb package
23:15:39Araqin fact
23:15:45flaviuAraq: Tarball is better
23:15:47Araqjust use niminst
23:16:04flaviuI don't want to deal with debs, and every distro does tarball
23:16:17Araqtarball doesn't do deps
23:16:30flaviuWith a readme it does lol
23:16:34superfuncOk cool. I just figured I'd ask you guys to make sure I wasn't overlooking anything.
23:16:44superfuncAlso, lol flaviu
23:17:10Araqsuperfunc: really, use niminst, it generates installers for linux and windows
23:17:25Araqand .zip for other OSes
23:18:10superfuncOk cool.
23:19:05Araqflaviu: since you keep bringing up this point
23:19:15Araqspot the error:
23:20:12Araq"Araq will happily implement a language optimized for average joe where syntactic decisions have been made via surveys"
23:21:40flaviuGrammar looks good, I'm not sure what you mean though
23:21:59flaviulack of surveys?
23:22:09Araqlol
23:22:19Araqperhaps you should sleep over it
23:23:35Araqhints:
23:23:43Araq* nobody pays Araq to do this
23:23:52Araq* this is not how open source works
23:24:15Araq* in fact, I don't think there is an open source project out there that works this way
23:24:54flaviuOf course, you have every right to write the programming language however you'd like
23:25:36flaviuYou can and probably should ignore 99% of suggestions
23:29:39OrionPK"Araq will grudgingly implement a language optimized for average joe where syntactic decisions have been made via surveys" maybe?
23:30:21flaviu"Araq will grudgingly implement a language optimized for average joe where syntactic decisions have been made via surveys if someone pays him"?
23:30:38*Matthias247 quit (Read error: Connection reset by peer)
23:32:00Araq"Araq is open for compromises and the current design already is much friendlier than Araq's personality would suggest"
23:32:07Araq*open to
23:32:24Araq:P
23:44:56Araqgood night
23:46:34*askatasuna quit (Ping timeout: 244 seconds)